Leading Zero with Function

K

klmiura

I have a column that displays zipcodes in the Zip Code format, but I am
trying to create a column to the left of that column that will display the
first three digits of the zip code and I am having issues bringing forward
the leading zeros. I have tried custom formatting and am using the following
formula to bring the first three digits over =LEFT(B4005,3); this formula
brings over the first three digits in all cases except the leading zeros. I
am at a loss. Any assistance would be greatly appreciated.

Karen
 
K

klmiura

Thank you so much, you guys are great.

John Bundy said:
You need to add the zeroes with the test statement or format, her is an example
=LEFT(TEXT(A1,"00000"),3)
 
B

BoniM

If you check, I think you will find that the zeros are not really there, but
that those cells have a custom format of 00000, which is telling the cell to
make 123 look like 00123. You just need to do the same thing:
=LEFT(TEXT(B2,"00000"),3)
 
K

klmiura

Thank you so much!

BoniM said:
If you check, I think you will find that the zeros are not really there, but
that those cells have a custom format of 00000, which is telling the cell to
make 123 look like 00123. You just need to do the same thing:
=LEFT(TEXT(B2,"00000"),3)
 

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