Formatting Excel number to show Accounting dash with in my current formula

New here!!
“Format a number with optional decimal places in Excel” answered most of my question

Blockquote

This seems to be the simplest way to have a Decimal shown when there are fractional numbers – and No Decimal shown for whole numbers:

=TEXT(ROUND(Base_Number,Max_Decimal_Places),”general”)
or with cell references:
=TEXT(ROUND(A1,2),”general”)

Gives
15 = 15

9.23432234 = 9.23

edited Jan 17, 2014 at 17:41
Excellll’s user avatar
Excellll
12.9k1111 gold badges5555 silver badges7878 bronze badges
answered Jan 17, 2014 at 17:34
lookingforsame’s user avatar
lookingforsame

Blockquote

I didn’t know how to respond to this poster’s post. This works perfectly for me, except I wish to have all results that are ZERO turned into the Accounting ” – ” format. My sheet is for inventory and is a pain seeing 1554.00 units on hand, as opposed to 1554. But I also have to show .375 occasionally. If the cell is formatted for Accounting, and typing this formula in, it ignores the dash. I tried several of the other posters options, but got a little over my head.
Thank you for any assistance.