#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default LOOKUP?

I need to match a 5-digit zip code with a person responsible for that area.
For instance, if I type in 49494, and I have a person responsible for the
entire 494 area, I'd like to return the value (person) who has that area
without have to do a matchup for each individual zip code. For instance:

I type in 49494. I have another list that shows this:
490 - Smith
491 - Jones
492 - Hayes
493 - Gates
494 - Doe

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default LOOKUP?

Suppose that list is in M1:N5, and you enter 49494 in A1 - put this in
B1:

=IF(ISNA(MATCH(--LEFT(A1,3),M$1:M$5,0)),"no-one",VLOOKUP(--LEFT(A1,3),M
$1:N$5,2,0))

I assume that the 490, 491 etc in column M have been entered as
numbers, so the -- in front of the LEFT functions ensures that the
lookup value is also a number.

Hope this helps.

Pete

On Nov 7, 1:06*am, mailrail
wrote:
I need to match a 5-digit zip code with a person responsible for that area.
For instance, if I type in 49494, and I have a person responsible for the
entire 494 area, I'd like to return the value (person) who has that area
without have to do a matchup for each individual zip code. *For instance:

I type in 49494. I have another list that shows this:
490 - Smith
491 - Jones
492 - Hayes
493 - Gates
494 - Doe

Thanks in advance!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default LOOKUP?

I keep coming up with no-one each time I try this. What am I doing wrong?

"Pete_UK" wrote:

Suppose that list is in M1:N5, and you enter 49494 in A1 - put this in
B1:

=IF(ISNA(MATCH(--LEFT(A1,3),M$1:M$5,0)),"no-one",VLOOKUP(--LEFT(A1,3),M
$1:N$5,2,0))

I assume that the 490, 491 etc in column M have been entered as
numbers, so the -- in front of the LEFT functions ensures that the
lookup value is also a number.

Hope this helps.

Pete

On Nov 7, 1:06 am, mailrail
wrote:
I need to match a 5-digit zip code with a person responsible for that area.
For instance, if I type in 49494, and I have a person responsible for the
entire 494 area, I'd like to return the value (person) who has that area
without have to do a matchup for each individual zip code. For instance:

I type in 49494. I have another list that shows this:
490 - Smith
491 - Jones
492 - Hayes
493 - Gates
494 - Doe

Thanks in advance!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default LOOKUP?

That means that the formula is not finding an exact match. Maybe your
entries in column M are in fact text values, in which case you will
not need the double unary minus (--) in the formula. If they are text
values then you will need to be wary of other characters that might
have got in, such as spaces.

Or, it might be tht you don't have any exact matches.

Hope this helps.

Pete

On Nov 7, 4:35*pm, mailrail
wrote:
I keep coming up with no-one each time I try this. What am I doing wrong?



"Pete_UK" wrote:
Suppose that list is in M1:N5, and you enter 49494 in A1 - put this in
B1:


=IF(ISNA(MATCH(--LEFT(A1,3),M$1:M$5,0)),"no-one",VLOOKUP(--LEFT(A1,3),M
$1:N$5,2,0))


I assume that the 490, 491 etc in column M have been entered as
numbers, so the -- in front of the LEFT functions ensures that the
lookup value is also a number.


Hope this helps.


Pete


On Nov 7, 1:06 am, mailrail
wrote:
I need to match a 5-digit zip code with a person responsible for that area.
For instance, if I type in 49494, and I have a person responsible for the
entire 494 area, I'd like to return the value (person) who has that area
without have to do a matchup for each individual zip code. *For instance:


I type in 49494. I have another list that shows this:
490 - Smith
491 - Jones
492 - Hayes
493 - Gates
494 - Doe


Thanks in advance!- Hide quoted text -


- Show quoted text -


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
Matrix lookup/mulitple criteria lookup MarkFranklin Excel Discussion (Misc queries) 3 March 31st 08 10:15 AM
Get Cell Address From Lookup (Alternative to Lookup) ryguy7272 Excel Worksheet Functions 12 September 28th 07 10:36 PM
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
Sumproduct - Condition based on lookup of a Lookup Hari Excel Discussion (Misc queries) 12 May 31st 06 09:28 AM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM


All times are GMT +1. The time now is 05:17 AM.

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

About Us

"It's about Microsoft Excel"