Solved

# Excel - simple formula

Posted on 2011-10-14
225 Views
Hi EE-r's - It's late and I just cannot get this.

Simply need a formula that will give answer in all cases as follows:
Have 3 columns
col 1 is an amount positive, neg or zero
col 2 is the same
col 3 needs to be the difference between the two stated with the correct sign
I can get it to work mostly but when pos and neg numbers flip flop it gets cranky.
Thanks,
0
Question by:COBOLforever

LVL 50

Accepted Solution

Hello,

The difference between the two can be calculated in two ways, depending on how you want to display the difference. For example:

one      two      result A      result B
-1        1            -2                     2
1        -2             3                   -3
-2        2            -4                    4

Result A is calculated with
=A2-B2

Result B is calculated with
=B2-A2

cheers, teylyn
0

Author Closing Comment

Crazy how difficult I was making it. Thanks much,.
0

## Featured Post

### Suggested Solutions

How to Win a Jar of Candy Corn: A Scientific Approach! I love mathematics. If you love mathematics also, you may enjoy this tip on how to use math to win your own jar of candy corn and to impress your friends. As I said, I love math, but I gu…
Have you ever thought of installing a power system that generates solar electricity to power your house? Some may say yes, while others may tell me no. But have you noticed that people around you are now considering installing such systems in their …
Viewers will learn how to share Excel data with others from desktop Excel, as well as Excel Online via OneDrive, and embed an Excel file on a website.
Viewers will learn the basics of using Excel Tables, the benefits found with them, and some pitfalls.