Custom cell format

PATSYS

Well-known Member
Joined
Mar 12, 2006
Messages
1,750
How do I make the cell format in such a way that if the value is zero, what should appear is "-", if the value is negative, then it has to be with red font color, and if positive, just the normal font color. And all these with no decimals and with comma separator for thousands.

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Good morning PATSYS

This format worked OK for me. Beware of typos, as you can't copy and paste into the custom format box - I think I've reproduced the format faithfully below - post back if you can't make it work :

[=0],"-";[Red][<1]#,##0;#,##0

HTH

DominicB

Edit : Slight correction
 
Upvote 0
..perhaps this?
#,##0;[Red]#,##0;"-"
or
#,##0;[Red]-#,##0;"-"
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,971
Members
449,059
Latest member
oculus

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