When "IF" is not enough...

D

duke_h

I'm working on a spreadsheet with postal adresses. All the adresses are
located geographicaly in a non-urban area and the postal code depends on the
name of the village of the recipient. I have almost 500 people (=adresses) in
about 15 villages. These 15 villages share 8 different postal codes. I would
like to use a function that "sees" the name of the village in the "Village"
column and produces the right postal code. The IF function cant be used for
more than 7 "ifs". What could I do?
 
M

Max

Assume this data:
These 15 villages share 8 different postal codes
is listed in Sheet2, cols A and B,
villages in col A, corresponding postal codes in col B

In Sheet1,
Assume the village data is in D2 down
Put in E2: =IF(D2="","",VLOOKUP(D2,Sheet2!A:B,2,0))
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:365 Subscribers:65
xdemechanik
---
 
K

Keith Faulconer

Duke:

If each village will have it's own postal code, then set up a list that
would liik like this:

Village Postal Code
Village 1 50000
Village 2 50001
etc

When you get all of the villages entered, highlight the list and name it
something like "Codes." Then, do a vlookup function. If the village is
listed in cell b1, then your formula would be

=vlookup(b1,Codes,2,0)

Hope it helps.
 

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