tags:

views:

67

answers:

2

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

+1  A: 

Use conditional formatting. Use the formula =a1=round(a1,0) and set the formatting to 0.

Mark Ransom
+1  A: 

The General format option does that already without any formulas needed.

guitarthrower
You are right, but we need the conditional formatting in case we are using $ columns for example (will update the question to be more specific)
tivo