Custom number format zero not showing

Ironman

Well-known Member
Joined
Jan 31, 2004
Messages
1,069
Office Version
  1. 365
Platform
  1. Windows
Hi

I'm using a custom number format #"lb" so it looks like the below. But I just can't figure out how to amend it so where the value is zero, it shows "0lb", not "lb".

-3lb
-15lb
lb


Help appreciated, thank you!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Ahhh that's brilliant, many thanks Joe!
 
Upvote 0
In the above example, how do I format a cell so only positive values are prefixed "+(x)lbs"? I've tried +0"lb" but that returns a plus prefix for negative and zero values as well.
 
Upvote 0
In the above example, how do I format a cell so only positive values are prefixed "+(x)lbs"? I've tried +0"lb" but that returns a plus prefix for negative and zero values as well.
If you mean something like this:
Book1
F
13
25lbs
30lbs
Sheet1

NOTE: if you mouse over the 3 in F1, you'll see it has a value of -3.
try:
0"lb";0;0"lb"

If you don't want 0 to have a "lb" suffix, drop the "lb" on the last element.
 
Upvote 0
Thanks again Joe, I was looking for this (the 5lbs cell is the only positive value) without the +signs after the negative values/preceding the zero value:

+5lbs
-+3lbs
-+15lbs
+0lbs
 
Upvote 0
Brilliant Rick, works perfectly! Thanks a lot.

Thanks to you too Joe for your earlier solution.
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,286
Members
449,076
Latest member
kenyanscott

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top