ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Percentages (https://www.excelbanter.com/excel-discussion-misc-queries/190468-percentages.html)

Kindlysinful

Percentages
 
Hello,

I have a question about percentage calculations.
I have data in a1, a2, a3..... And I want find the percentage difference
from A2 and A1. Or, the most current entry with the previous entry.
I am using, "=IF(A1=0,"",(a2/a1)*0.1) and that will get me the difference
in a percentage value but it will not give me the negative percentage value.
All values come up as a positive number.
The cells are formated for "percentage"

Example
A1 23.00
A2 24.00
A3 18.00

When I compare A2 to A1 I will get 10.43%
When I compare A3 to A2 I will get 7.50%. This number should come up as
-7.50%

joeu2004

Percentages
 
On Jun 8, 7:08*pm, Kindlysinful
wrote:
I want find the percentage difference from A2 and A1.
Or, the most current entry with the previous entry.
*I am using, "=IF(A1=0,"",(a2/a1)*0.1) and that will get
me the difference in a percentage value but it will not
give me the negative percentage value.


I don't know why you think that gives percentage difference. The
correct formula is:

=if(A1=0, "", A2/A1 - 1)

"Minus 1", not "times 1". That will give you negative difference as
well. Be sure to set the cell format to Percentage with some of
decimal places, if you like.

Caveat: That works fine if A1 and A2 are both positive or both
negative, and if A1 is zero because of your conditional test.

Example
A1 23.00
A2 24.00
A3 18.00

When I compare A2 to A1 I will get 10.43%


But the correct answer is 4.35%.

When I compare A3 to A2 I will get 7.50%.
This number should come up as -7.50%


The correct answer is -25%.




Kindlysinful

Percentages
 
DOH!
I must have been totally asleep when I was looking at this. I never even
noticed the *.

Thanks

Scott

"joeu2004" wrote:

On Jun 8, 7:08 pm, Kindlysinful
wrote:
I want find the percentage difference from A2 and A1.
Or, the most current entry with the previous entry.
I am using, "=IF(A1=0,"",(a2/a1)*0.1) and that will get
me the difference in a percentage value but it will not
give me the negative percentage value.


I don't know why you think that gives percentage difference. The
correct formula is:

=if(A1=0, "", A2/A1 - 1)

"Minus 1", not "times 1". That will give you negative difference as
well. Be sure to set the cell format to Percentage with some of
decimal places, if you like.

Caveat: That works fine if A1 and A2 are both positive or both
negative, and if A1 is zero because of your conditional test.

Example
A1 23.00
A2 24.00
A3 18.00

When I compare A2 to A1 I will get 10.43%


But the correct answer is 4.35%.

When I compare A3 to A2 I will get 7.50%.
This number should come up as -7.50%


The correct answer is -25%.






All times are GMT +1. The time now is 06:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com