Zip Code entry

dave8

Active Member
Joined
Jul 8, 2007
Messages
267
I have an input form which contains Name, Address, City, State, Zipcode. Is it possible when the user types in a Zipcode to automatically populate the City and State? Where can I get a list of ZipCodes? My thinking is that I will have a list of zipcodes in one column and associate the City and State in the corresponding column. Then use vLookup to find the Zipcode. Does anyone know where I can obtains a zipcode list?
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

poolhall

Active Member
Joined
Jan 9, 2009
Messages
350
you know that there are about 42 000 zip codes in the USA, don't you?
 

dave8

Active Member
Joined
Jul 8, 2007
Messages
267
I know there's a lot of Zipcodes. I didn't know there were over 42000. I think Excel can handle that.
 

shemayisroel

Well-known Member
Joined
Sep 11, 2008
Messages
1,867

ADVERTISEMENT

I know there's a lot of Zipcodes. I didn't know there were over 42000. I think Excel can handle that.
Depends what your doing with it however I'd say you'll be fine.
 

Ruddles

Well-known Member
Joined
Aug 24, 2010
Messages
5,785
You can always split them into two or more smaller tables if you find the lookups taking too long - ten separate tables even, and select your table depending on the first digit of the zip. We have over 1.6 million postcodes in the UK!
 

sulakvea

Well-known Member
Joined
Jul 2, 2008
Messages
994
hi, i just found this:

http://www.zip-codes.com/zip-code/07032/zip-code-07032.asp

the good thing about this link is that you can change the zip code manually in the URL - and it displays correct location (i tested a dozen and it did).

so you can use a web query to pull the data (build a URL with variable zip code in it). something like

Code:
TmpUrl = "http://www.zip-codes.com/zip-code/" & TmpZip & "/zip-code-" & TmpZip & ".asp"

TmpZip can be a value in the cell, or textbox, etc.

this way you wont have to search for the list of all zipcodes
 

Watch MrExcel Video

Forum statistics

Threads
1,108,579
Messages
5,523,700
Members
409,532
Latest member
Lmfacc

This Week's Hot Topics

Top