Reputation: 146
I'm having some trouble with Excel formats:
Example:
Value: 13
Expected result: 13 (not 13. )
Value: 13.5
Expected result: 13.5
Value: 13.1234
Expected result: 13.1234
Right now I'm using #.# format, but for the first value it always formats with the . character at the end. Any ideas?
Edit: We need to have this working for different number formats (%, $, etc). So we have the some additional examples:
Value: 13
Expected result: $13 (not $13. )
Value: $13.5
Expected result: $13.5
Value: $13.1234
Expected result: $13.1234
Upvotes: 0
Views: 772
Reputation: 5834
The General format option does that already without any formulas needed.
Upvotes: 1
Reputation: 308121
Use conditional formatting. Use the formula =a1=round(a1,0)
and set the formatting to 0
.
Upvotes: 1