ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Number entry starting with a "0", how do I view correctly? (https://www.excelbanter.com/excel-discussion-misc-queries/218981-number-entry-starting-0-how-do-i-view-correctly.html)

Monique

Number entry starting with a "0", how do I view correctly?
 
If a cell contains a number series, such as 01239, how do I prevent the first
"0" from being omitted?

FSt1

Number entry starting with a "0", how do I view correctly?
 
hi,
excel strips off leading zeros because mathmatically, they are unnecessary.
usully such "numbers" are some kind of id and are technically not numbers
because you don't really want to do mathmatical stuff with them anyway.
to keep the leading zeros, prefomat as text or preceed entry with an
apostrophe.

regards
FSt1

"Monique" wrote:

If a cell contains a number series, such as 01239, how do I prevent the first
"0" from being omitted?


T. Valko

Number entry starting with a "0", how do I view correctly?
 
You'd have to enter the number as a TEXT string.

Either preformat the cell as TEXT or precede the entry with an apostrophe:
'01239. The apostrophe does not display in the cell.

Another possibility, if the length of all entries is to be the same, you
could use a custom number format like: 00000. Using this method the leading
zero(s) will *display* 01239 but the true underlying value of the cell will
be 1239.

--
Biff
Microsoft Excel MVP


"Monique" wrote in message
...
If a cell contains a number series, such as 01239, how do I prevent the
first
"0" from being omitted?





All times are GMT +1. The time now is 03:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com