Data with leading zeros

S

sheddhead

We pull data into Excel that has the following format -

#####

We want to do two things with this data. First, we want
to add 2 0's before the last #. ####00#.

Second, we want Excel to recognize - not suppress leading
0's on the number. So, if 0#### were entered, the display
and the formula bar would both show: 0###00#.

How would I customize the numbers for these cells, to get
this display? Thanks!!!!
 
J

Jason Morin

See if this works:

=REPLACE(IF(LEN(A1)=5,A1,REPT(0,5-LEN(A1))&A1),4,,"00")

HTH
Jason
Atlanta, GA
 

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