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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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