I am trying to calculate percent change when the base number (at time 1) can be a negative and the resulting number is positive (at time 2).
My problem is the percent changes from -4 to +4.
A change from +4 to -4 reports back a -200% change. However, the same formula A1/B1-1 when A1 equals -4 and B2 equals 4 is also reported as -200% but it should be a 200% increase.
The ABS function does not solve this. Has anyone crafted a fix for this?
44 Answers
If A1 is the old value and B1 the new one:
=(B1 - A1) / Abs(A1) 8 Use this in Excel where A1 is the new value and B1 is the old value:
=IFERROR(IF(AND(A2<0,B2<0,A2>B2),((A2-B2)/B2)*-1,IF(AND(A2<0,B2<0,A2>B2), ((A2-B2)/B2),IF(AND(A2<0,B2<0),((A2-B2)/B2)*-1,IF(AND(A2>0,B2<0),((A2-B2)/B2)*-1,IF(B2<A2,((A2-B2) /B2),IF(B2>A2,((A2-B2)/B2),ABS(((A2-B2)/B2))))))))*100,"")
Explanation: The above formula is basically this formula ((A2-B2)/B2)*100 But it only calculates positive numbers But if you want to know the change percentage for all numbers my given formula will solve the issue and it handles all below situations:
- A>0, B>0, A
- A>0, B>0, A>B
- A<0, B>0, |A|
- A<0, B>0, |A|>B
- A>0, B<0, A<|B|
- A>0, B<0, A>|B|
- A<0, B<0, |A|<|B|
- A<0, B<0, |A|>|B|
Prior + “%change“ * ABS(Prior) = Current
Where “%change” is defined as (Current - Prior)/ABS(Prior)
Current and or Prior can be positive or negative, but Prior cannot be zero.
The following article provides a detailed explanation as to why the (b-a)/ABS(a) formula makes sense.
2