Zip Codes Dropping Leading Zero

G

GermanKeg

An excel file that is imported into a mapping program drops the leading zero
in the zip code e.g. 02169 registers as 2169. I've tried formatting to zip
code and custom formatting, both for 5 digits. Nothing has worked. I've
noticed that even when this is done, the leading zero doesn't appear in the
excel formula bar.

Any thoughts on how to set up zip codes so that they can be imported with
the leading zero?

thx, craig
 
R

Rich/rerat

GermanKeg,
Have you tried formatting the column as Text?

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) <message rule>
<<Previous Text Snipped to Save Bandwidth When Appropriate>>


An excel file that is imported into a mapping program drops the leading zero
in the zip code e.g. 02169 registers as 2169. I've tried formatting to zip
code and custom formatting, both for 5 digits. Nothing has worked. I've
noticed that even when this is done, the leading zero doesn't appear in the
excel formula bar.

Any thoughts on how to set up zip codes so that they can be imported with
the leading zero?

thx, craig
 
R

Robert Flanagan

precede the zip code with a single quote when you type it in : '01234

If you have a lot to fix, a simple macro will fix - sort the cells by zip
and select only those to be fixed

Sub FixCells()
for each cell in selection
cell.value ="'0" & cell.value
next
end sub

Robert Flanagan
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
S

Sane

precede the zip code with a single quote when you type it in : '01234

If you have a lot to fix, a simple macro will fix - sort the cells by zip
and select only those to be fixed

Sub FixCells()
    for each cell in selection
        cell.value ="'0" & cell.value
    next
end sub

Robert Flanaganhttp://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel








- Show quoted text -
I think this will work -
Select cells containing zip codes, right click, select format cells,
select custome & enter number five zeros
 

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