padding ?

V

vbastarter

I have a columnn with id numbers
ex:
012
456788
78
.... etc
I would like the final Id to be 10 digits so i would like to pad 0's in the
front eg:
012 -> has to become 0000000012
456788 -> hast to become 0000456788

Is there a function in excel that can achieve this for teh entire column ?

Many Thanks
 
D

Dave Peterson

You can change the number format to "0000000000" (without the quotes) and the
cells will display all those leasing 0's.

Select the column
format|cells|number tab
custom category
type in that long string of 0's
hit ok.
 
G

Gary Brown

You have two options depending on what you are trying to achieve. If you
want the data to be held with the leading zeros then format the column
as text and put a data validation on the cells requesting a text length
of 10 characters.

If you are not bothered with what is actually in the cell, you just
want it to display with 10 numbers, then use a custom formt of
0000000000. This will then display the number 123 as 0000000123
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top