Cell Number Format to include Millions and Thousands

jay_hl

New Member
Joined
Jun 28, 2012
Messages
27
Hello

Im having some problem with a number format. This format gives me what I need (dollar signs, positives in black, negatives in red, zero's hidden)
_-[$$-en-US]* #,##0_ ;[Red]_-[$$-en-US]* -#,##0 ;;

However I would like to add to both positives and negatives that Millions are to 1 decimal place with " M", and thousands to the whole number and then " k". When I do this, I get an error saying Excel cannot use this
[>=1000000] _-[$$-en-US]* #,##0.0,," M";[>0]_-[$$-en-US]* #,##0," k";[>=1000000] _-[$$-en-US]* #,##0.0,," M";[Red][>0]_-[$$-en-US]* #,##0," k";;

This line does work for positive numbers (with M and k), but messes up for negatives and then displays zeros.
[>=1000000] _-[$$-en-US]* #,##0.0,," M";[>0]_-[$$-en-US]* #,##0," k";[Red]General

Any help would be appreciate if we can merge.

Jay
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi Jay,

I learned that you will not be able to do what you want with the customer number format alone. You will need to use conditional formatting as well.

Here is what I did that worked with what I think you wanted.

For the positives I used: "Conditional Formatting" > "Format only cells that contain" > "Cell Value" > "greater than or equal to" > "0" with the format: [>=1000000] _-[$$-en-US]* #,##0.0,," M";[>0]_-[$$-en-US]* #,##0," k";General.

For the negatives I used: "Conditional Formatting" > "Format only cells that contain" > "Cell Value" > "less than or equal to" > "0" with the format: [Red][<=-1000000] _--[$$-en-US]* #,##0.0,," M";[Red][<0]_--[$$-en-US]* #,##0," k";General.

If you need any more help let me know!

Thanks!

Zach
 
Upvote 0
Solution

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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