Forum Discussion
Rodrigo_Soto
Oct 02, 2022Copper Contributor
Cell Format
Hi, I need to know how do I set a cell, to divide by certain number, in orden to obtain automatically a division by this constant number. I need this because I'm working with physical magnitudes, an...
HansVogelaar
Oct 02, 2022MVP
If you want to enter 1000 but see 1, set the number format of the cell(s) to the custom format 0, (a zero followed by a comma)
Rodrigo_Soto
Oct 02, 2022Copper Contributor
mmm I'm not sure, cause, what about if I want to put 1250m. How can I achieve that it shows me 1,25km? Thanks for the feedback, I really appreciate that.
- PeterBartholomew1Oct 02, 2022Silver Contributor
As HansVogelaar suggests, once you type the 'm' you are doomed; you no longer have a number. To show the distance in km with decimal places you could use the custom number format
0.00, "km"on a computer set to English locale
- HansVogelaarOct 02, 2022MVP
Or, since Rodrigo uses comma as decimal separator, the custom number format
0,00. "km"
- PeterBartholomew1Oct 02, 2022Silver ContributorThanks. That is what I would have guessed, but I have no way of checking!
- HansVogelaarOct 02, 2022MVP
If you enter 1250m, Excel interprets it as text, not as a number. To convert it to 1,25km would require VBA code. Would that be OK? (It would disable Undo)