Gary''s Student said:
The minus sign can be reversed by reversing the numerator.
If your formula looks like =(a-b)/b then try =(b-a)/b
I disagree. It is important to keep the sign right, and it is
important to keep the direction of subtraction consistent
with the percentage difference that you want.
If you want to know the percentage difference of "A over B",
you should do (A-B)/B. The choice usually favors a positive
percentage when A is greater than B. If A is smaller than B,
that will be correctly reflected by a negative percentage, read:
"A is less than B by x%".
If you reverse the sign arbitrarily, you will not know if x%
reflects an increase or a decrease. Or worse: you might
misinterpret a percentage increase as a decrease because
it now will have a negative sign(!).
If you want to know the percentage difference of "B over A",
you should do (B-A)/A. Again, the choice usually favors a
positive percentage when B is greater than A.
By the way, if you do want to reverse the sign :-(, I would
prefer to write -(A-B)/B for A over B. The result is the same
as (B-A)/B, of course. But by keeping the orginal form, viz.
(A-B)/B, the intention is more self-documenting. This is
important for debugging, esp. by another person. If I saw
(B-A)/B, I might wonder if you mistyped the denominator,
intending A instead of B (i.e, "B over A").
But more likely, you would want an always positive
percentage :-(. In that case, I would do ABS((A-B)/B) for
A over B.
Again, I do not recommend that unless it makes sense
for the application.