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.
-
Can you be more specific? What do you mean by coding? With VBA? Can you show us what you tried with code?JasonAizkalns– JasonAizkalns2015-04-27 14:05:49 +00:00Commented Apr 27, 2015 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– tea_pea2015-04-27 14:09:19 +00:00Commented Apr 27, 2015 at 14:09
-
ElevImp = Round(ElevVal, 1)Paul– Paul2015-04-27 14:57:39 +00:00Commented Apr 27, 2015 at 14:57
-
that is something I have and I want to be able to make the number be 240.0 instead of 240Paul– Paul2015-04-27 14:58:03 +00:00Commented Apr 27, 2015 at 14:58
Add a comment
|
2 Answers
Try:
oWrkSheet.Cells(110, 17).NumberFormat = "0.0"
It can work for many other numeric formats. See this post for more informations.