• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Excel - simple formula

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.
1 Solution
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:

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

Result B is calculated with

cheers, teylyn
COBOLforeverAuthor Commented:
Crazy how difficult I was making it. Thanks much,.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now