Zip Code entry

dave8

Active Member
Joined
Jul 8, 2007
Messages
275
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?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I know there's a lot of Zipcodes. I didn't know there were over 42000. I think Excel can handle that.
 
Upvote 0
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!
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,948
Messages
6,122,420
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top