View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default How do I format a field in Excel to allow for leading zeros?

You can either use a custom NUMBER format if the length of all entries will
be the same.

For example: Custom format 00000

Then:

1 becomes 00001
12 becomes 00012
123 becomes 00123
1234 becomes 01234
12345 stays 12345

However, using this method Excel will still not recognize the leading 0's.
00001 has a true underlying value of 1.

Or, you can preformat the cells as TEXT.

Or, you can precede the entry with an apostrophe as you enter them: '00001.
This also results in a TEXT entry.

Biff

"debbie" wrote in message
...
I am creating an Excel Document that has certain values that must have
leading zeros. Does anyone know how to allow leading zeros in Excel?