zero as leading digit

  • Thread starter Thread starter Lynda
  • Start date Start date
L

Lynda

How can I get Excel to accept a zero as the first digit
in a string (an ID number) without formating the cell as
text?
 
format / number / custom in "type" enter a zero for each
character in the ID number. For a 7 number ID, enter
0000000, for 5 enter 00000, for 3 enter 000...

have fun
 
Format
Cells
Custom
In the "Type" window enter
0,000.00 (the number of "0"'s can be varied to what you need)
ok

formatting the cell with "0"'s instead of "#"'s will show the leading
zero's.
using a ' before the number will make it text
 
But that, in effect, forces the data type to text. If he wants to use this as a number in other
formulas, formatting is the best approach.
 
Yeah, but...

The OP didn't want to format the cell as text, but still was ok treating the
value (an ID number) as a string.

I kind of got the impression that the poster wanted a quicker way to do data
entry than formatting the cell as text each time.

(But if that's the case and the id numbers go in a single column, the OP could
just format the whole column as text and never have to worry.)
 
Back
Top