English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am working on a project where I have to enter in MANY (about 100+) zip codes, again and again, in the state of Maine on a database that I am creating in excel. Is it possible for me to create a master list (with all the Maine zip codes in one column and the towns the represent in the second) and put it in Sheet 2 in my spreadsheet and use a formula to have it automatically enter the zip code when I enter the town on my original sheet? I also wouldn't mind having it automatically enter the town if I enter the zip code, either. Either way it would be very helpful if someone could have some suggestions on how to do this!

Thanks in advance!

2007-01-14 10:17:47 · 2 answers · asked by Kristen 2 in Computers & Internet Software

2 answers

I would use the vlookup function. Note: if you want it to enter a zip off of a city inputed, and a city has more than one zip code, you are only going to get a single zip code listed. The reverse, inputting a zip code, will always give you the correct city.

Here's the formula:
=vlookup(a1,'sheet1'!$A$1:
$B$200,2,false)

a1 is the zip you are entering
sheet1 is referring it back to the database of city of zips and cities.
$A$1:$B$200 is whatever the range of your database is.
2 in this case is the 2nd column you want it to retrieve from the database once it's found a match.
false give you only exact matches.

Hope that helps!

2007-01-15 03:33:04 · answer #1 · answered by Moondog 2 · 0 0

I don't use Excel that much anymore but I think you can do that with the Lookup Function...see the link below

http://www.techonthenet.com/excel/formulas/lookup.php

2007-01-14 18:30:05 · answer #2 · answered by lv_consultant 7 · 0 0

fedest.com, questions and answers