How can I get an Excel spreadsheet to show the leading zero in a five-digit ID number?

When I enter a number as 01111, it shows that number to be 1111. What do I need to do so that it will show all five digits?

rmm2011-09-20T10:52:41Z

Favorite Answer

do a custom number format of 00000 for the cell(s)

This assumes that the value will always be five digits

Format - Cells - Number tab - Custom, then enter 00000

Scrawny2011-09-20T18:22:55Z

Format the cells as text and the leading zeros will be maintained. In Excel 2007 the numbers that are text formatted can still be used in calculations as real numbers. This may be true in other versions as well.

Lou2011-09-20T17:54:44Z

Select the column
Right Click
Choose format cells
Then custom
Choose 0 from Type
Enter 00000 in that field
Choose ok

Kristoffer2011-09-20T18:06:50Z

I had to do something similar recently. In my case, it was 5 decimal points, so I put 0.00000. In your case you want to put the format as 00000.

Tom2011-09-20T18:01:01Z

use a ' symbol in front of the digits like '000405

hope this helps. Good luck
tom
thomas69k@yahoo.com