Number Formatting Question

PaulOPTC

New Member
Joined
Jan 13, 2022
Messages
48
Office Version
  1. 365
Platform
  1. Windows
Good Afternoon,

I am looking to format some of the number in my sheet and I cant seem to get the correct combination of formatting, maybe there is something that I am missing.

I want them to have a $ in front.
I want them to have a comma for the 1,000 and above
and I want them to up to three decimal places, but only if it needs it, if it is a whole number there is no need to add the extra 0s.
And I would like any 0s in the data to be empty.

For Example:

One dollar - $1
one dollar and fifty cents - $1.5
one thousand dollars and fifty cents - $1,000.5
one thousand dollars and fifty five and a half cents - $1,000.555

Here is my current custom Format, it is very close to what I would like but it does not add the comma

$General;-$General;;@

this format is also very close, it just adds an extra . at the end of any whole number ( like $123 would be $123. )

$####.##;-$####.##;;@


Thank you for your help!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
You'll actually want to do this as 2 conditional formatting rules, each being in the "Use a formula to determine which cells to format".

Note: Cell Reference A1 is the piece you will want to adapt to fit the column you are wanting to format.
The first one will be =MOD(A1,1)=0 then Change the Format to Currency, Show Dollar Sign, 0 decimal places.
The second will be =MOD(A!,1)<>0 then Change the Format to Custom, $#,###.###

Then copy paste format to the cells/columns that you would like to follow these rules.
 
Upvote 0
Solution
You'll actually want to do this as 2 conditional formatting rules, each being in the "Use a formula to determine which cells to format".

Note: Cell Reference A1 is the piece you will want to adapt to fit the column you are wanting to format.
The first one will be =MOD(A1,1)=0 then Change the Format to Currency, Show Dollar Sign, 0 decimal places.
The second will be =MOD(A!,1)<>0 then Change the Format to Custom, $#,###.###

Then copy paste format to the cells/columns that you would like to follow these rules.

Maybe I did it wrong, its really really close but not perfect.
One thousand = $1,000 which is perfect
One thousand and fifty five cents = $1000.55 (No comma)

If this is as close as we can get it, I will live without the comma for the fringe times where it will be over 1000, with cents

So I appreciate your help and I will apply this to the rest of my sheet!
 
Upvote 0
Maybe I did it wrong, its really really close but not perfect.
One thousand = $1,000 which is perfect
One thousand and fifty five cents = $1000.55 (No comma)

If this is as close as we can get it, I will live without the comma for the fringe times where it will be over 1000, with cents

EDIT: No clue what happened but I saved and opened the sheet back up and now it is working as intended!

I made a slight modification on it, instead of

"The first one will be =MOD(A1,1)=0 then Change the Format to Currency, Show Dollar Sign, 0 decimal places."

I made it a custom: $#,##0_);($#,##0);;
so It wouldnt show any 0s for me as $0

So I appreciate your help and I will apply this to the rest of my sheet!
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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