I am having trouble adding a zero after the decimal when coding in excel. The number that is being output is 240 and I want it to say 240.0. I have tried the round function in excel however that is only working when I have something like 242.46 and it gaves me 242.5.
Asked
Active
Viewed 1,512 times
0
-
Can you be more specific? What do you mean by coding? With VBA? Can you show us what you tried with code? – JasonAizkalns Apr 27 '15 at 14:05
-
If it's just in a cell on a worksheet, there is an 'increase decimal' button on the home ribbon (number section) that should do it. – tea_pea Apr 27 '15 at 14:09
-
ElevImp = Round(ElevVal, 1) – Paul Apr 27 '15 at 14:57
-
that is something I have and I want to be able to make the number be 240.0 instead of 240 – Paul Apr 27 '15 at 14:58
2 Answers
0
You can use a formula:
=TEXT(A1,"0.0")
Either change A1
to the appropriate cell, or surround the cell in question with a =TEXT(...,"0.0")

chancea
- 5,858
- 3
- 29
- 39