ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Add "+" plus symbol for a positive percentage (https://www.excelbanter.com/excel-discussion-misc-queries/447300-add-plus-symbol-positive-percentage.html)

chrisfordflorida

Add "+" plus symbol for a positive percentage
 
Also want to keep a "-" for a negative percentage and...
want a 0% to remain 0%.

Right now I am using a custom cell format of

+#0#%;-#0#%

This works fine if it is a positive or negative 5% (i.e. +5% or -5%), but if it is a 0% it shows +0%. For a 0% I want it to not show a '+' or a '-'. Thank you.

Ron Rosenfeld[_2_]

Add "+" plus symbol for a positive percentage
 
On Fri, 5 Oct 2012 18:45:49 +0000, chrisfordflorida wrote:


Also want to keep a "-" for a negative percentage and...
want a 0% to remain 0%.

Right now I am using a custom cell format of

+#0#%;-#0#%

This works fine if it is a positive or negative 5% (i.e. +5% or -5%),
but if it is a 0% it shows +0%. For a 0% I want it to not show a '+' or
a '-'. Thank you.


The third slot is for values equal to zero:

+0%;-0%;0%

chrisfordflorida

Quote:

Originally Posted by Ron Rosenfeld[_2_] (Post 1606107)
On Fri, 5 Oct 2012 18:45:49 +0000, chrisfordflorida wrote:


Also want to keep a "-" for a negative percentage and...
want a 0% to remain 0%.

Right now I am using a custom cell format of

+#0#%;-#0#%

This works fine if it is a positive or negative 5% (i.e. +5% or -5%),
but if it is a 0% it shows +0%. For a 0% I want it to not show a '+' or
a '-'. Thank you.


The third slot is for values equal to zero:

+0%;-0%;0%

It works. (+#0#%;-#0#%;#0#%) However, I just realized if I input -5% it will show as -05%. I tried taking the '0' out +##%;-##%;##% and that solved the -5% however anywhere it is 0% it shows a blank. Any solution? Thank you.

Ron Rosenfeld[_2_]

Add "+" plus symbol for a positive percentage
 
On Thu, 11 Oct 2012 22:29:11 +0000, chrisfordflorida wrote:

The third slot is for values equal to zero:

+0%;-0%;0%


It works. (+#0#%;-#0#%;#0#%) However, I just realized if I input -5% it
will show as -05%. I tried taking the '0' out +##%;-##%;##% and that
solved the -5% however anywhere it is 0% it shows a blank. Any
solution? Thank you.


The problem you describe does not occur if you use the custom format I recommended: +0%;-0%;0%

Also, I don't understand what you are trying to do with a #0#% type of format anyway. But the reason that ##% (or even #%) will show a blank if you have a zero value is because the # token, by design, does not display insignificant zero's.

chrisfordflorida

Quote:

Originally Posted by Ron Rosenfeld[_2_] (Post 1606299)
On Thu, 11 Oct 2012 22:29:11 +0000, chrisfordflorida wrote:

The third slot is for values equal to zero:

+0%;-0%;0%


It works. (+#0#%;-#0#%;#0#%) However, I just realized if I input -5% it
will show as -05%. I tried taking the '0' out +##%;-##%;##% and that
solved the -5% however anywhere it is 0% it shows a blank. Any
solution? Thank you.


The problem you describe does not occur if you use the custom format I recommended: +0%;-0%;0%

Also, I don't understand what you are trying to do with a #0#% type of format anyway. But the reason that ##% (or even #%) will show a blank if you have a zero value is because the # token, by design, does not display insignificant zero's.

Thank you. You asked why I did the #0#% -- I blame it on my own ignorance. You're recommendation worked perfect.


All times are GMT +1. The time now is 05:44 AM.

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