percentage

P

puiuluipui

hi, i have a small problem..
in cell a1 and b1 i have some numbers, and i want in c1 to view the
diferences between a1 and b1 in percentage. but i want to have the percentage
to be negative or positive.
example 1
a1 b1 c1
25 142 18%

example 2
a1 b1 c1
142 25 -18%



i hope i make the example the right way, but i want the diferences in
percentage.


thank you!!
 
N

nathan_savidge

This is how i have done it in the past.

Cell D1

=if(b1>a1,((b1-a1)/sum(a1:b1)),((b1-a1)/sum(a1:b1)))

and format as %ge
 
M

MartinW

Hi Pui,

One way, put this in C and drag down.

=ROUND(IF(A1<B1,A1/B1*100,-B1/A1*100),0)

and format as custom 0"%"

HTH
Martin
 
P

puiuluipui

it doesn't work. it doesn't see it as a formula. just as text. i just copy
and paste it and all it does is to display it as text, just as i copy it.
maybe it's a small problem, but it does'nt work.
and something i forgot to say is that if in a1 i have 0, and another number
in b1, i wont to see 0%

thanks allot

"MartinW" a scris:
 
M

MartinW

OK try this,
First up go to Tools>Options>View tab and make
sure Formulas is unchecked.

Then use this formula copy and pasted into C1.
=IF(OR(A1=0,B1=0),0,ROUND(IF(A1<B1,A1/B1*100,-B1/A1*100),0))

You may need to change this bit OR(A1=0,B1=0) to OR(A1="",B1="")
depending on how your data is setup.

Another thing to watch out for is you are not getting
extra spaces when you copy from this post.

HTH
Martin
 
D

David Biddulph

If you are seeing the formula, rather than the result, one posibility is
that you've got the cell formatted as text.
Format as General or Number, then go back into the formula edit mode
(perhaps by F2?), and accept the formula.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top