Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to format numbers (or currency) in Excel so that there will only be a period when there is not a whole number? For example:

12.43 will appear as 12.43
12 will appear as 12 and not 12.00

Rather than using "General" formatting, I am looking for a way to build on top of the custom format that I am already using: $0.##,,"m";$-0.##,,"m"

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You could do this by first formatting the numbers to show the two decimal places and then apply a conditional format to format the the whole numbers. A formula like this will find the whole numbers:

=IF(A1-INT(A1)=0,TRUE,FALSE)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.