ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   percentage (https://www.excelbanter.com/excel-discussion-misc-queries/183607-percentage.html)

puiuluipui

percentage
 
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!!

nathan_savidge

percentage
 
This is how i have done it in the past.

Cell D1

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

and format as %ge

"puiuluipui" wrote:

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!!


nathan_savidge

percentage
 
Sorry i have put that on wrong will correct in a bit

"nathan_savidge" wrote:

This is how i have done it in the past.

Cell D1

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

and format as %ge

"puiuluipui" wrote:

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!!


MartinW

percentage
 
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



"puiuluipui" wrote in message
...
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!!




puiuluipui

percentage
 
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:

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



"puiuluipui" wrote in message
...
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!!





MartinW

percentage
 
OK try this,
First up go to ToolsOptionsView 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


"puiuluipui" wrote in message
...
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:

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



"puiuluipui" wrote in message
...
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!!







David Biddulph[_2_]

percentage
 
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.
--
David Biddulph

"puiuluipui" wrote in message
...
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:

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



"puiuluipui" wrote in message
...
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!!







puiuluipui

percentage
 
thanks you all...my problem it's solved. thanks again


All times are GMT +1. The time now is 08:46 AM.

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