Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default When "IF" is not enough...

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default When "IF" is not enough...

Use VLOOKUP.
See this tutorial:

http://www.contextures.com/xlFunctions02.html

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"duke_h" wrote in message
...
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?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default When "IF" is not enough...

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
---
"duke_h" wrote:
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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default When "IF" is not enough...

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.


"duke_h" wrote in message
...
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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM


All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"