Forum Discussion

D_McClure2020's avatar
D_McClure2020
Copper Contributor
Feb 25, 2020

Excel Formula

Please help, I cannot find this formula for the following:

I need the difference between these 2 data points:  example

-100 to 438, the difference would be a positive 538.

438 to -100, the difference would be a negative 538

 

I've used ABS in the formula but that does not work in every situation.  I want to copy this formula so I can use it in all cells.  Going crazy here, ha.

8 Replies

    • D_McClure2020's avatar
      D_McClure2020
      Copper Contributor
      correct, but when I use that formula in a line item when they are both negative, it does not work.
      • mathetes's avatar
        mathetes
        Gold Contributor

        D_McClure2020 

         

        "does not work" does not describe what does happen...

         

        What does happen? I would assume that when both numbers are negative it still would give you the absolute difference, the question being whether that movement from one to the other was positive or negative depending on which came first.

         

        So another solution to the whole thing would be to use ABS to calculate the difference and then nest that within an IF that determines the direction.

         

        In short, I think we may all need a clearer description of the context here, what you're actually trying to accomplish and the purpose.

  • PReagan's avatar
    PReagan
    Bronze Contributor

    Hello D_McClure2020,

     

    Let's say that cell A1=438, B1=-100, A2=-100, B2=438.

    Then cell C1:

    =A1-B1

    Copy formula down to C2:

    =A2-B2

    Is this what you're looking for? 

Resources