Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gregg Riemer
 
Posts: n/a
Default Multiple Criteria Lookup Question

How do I do a table lookup with more than 1 criteria?

On Sheet1, I have a range containing Last Names, First Names, and Phone
Numbers. For example,

1 Last_Name First_Name Phone_Number
2 Smith Bob 555-1231
3 Jones Tom 555-6789
4 Smith Sue 555-2345
5 Anderson Tom 555-3456
etc...

This table is not sorted. There are may be multiple people with the same
last name (e.g. many Smiths) and multiple people with the same first name
(e.g. many Toms), but the combination of last name and first name is unique
(e.g. can't have two Tom Smiths).

What formula can I use to return the phone number when a last name and first
name are entered. For example, on Sheet2 I have

A B C
1 Last_Name First_Name Phone_Number
2 Lucas Jan ?

What formula can I enter in cell C2 to return the phone number from the
previous table? Note: The Last_Name, First_Name combination entered here are
guaranteed to be in the prior table.

I know I can add a helper column to the first table where I concatenate last
name and first name together to form a single unique string, but I really
don't want to use a helper column if I can avoid it.


  #2   Report Post  
RagDyer
 
Posts: n/a
Default

Try this *array* formula in C2:

=INDEX(Sheet1!$C$2:$C$10,MATCH(1,(Sheet1!$A$2:$A$1 0=A2)*(Sheet1!$B$2:$B$10=B
2),0))

And drag down to copy.

Array formulas are entered using CSE, <Ctrl <Shift <Enter, instead of the
regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Gregg Riemer" wrote in message
...
How do I do a table lookup with more than 1 criteria?

On Sheet1, I have a range containing Last Names, First Names, and Phone
Numbers. For example,

1 Last_Name First_Name Phone_Number
2 Smith Bob 555-1231
3 Jones Tom 555-6789
4 Smith Sue 555-2345
5 Anderson Tom 555-3456
etc...

This table is not sorted. There are may be multiple people with the same
last name (e.g. many Smiths) and multiple people with the same first name
(e.g. many Toms), but the combination of last name and first name is unique
(e.g. can't have two Tom Smiths).

What formula can I use to return the phone number when a last name and first
name are entered. For example, on Sheet2 I have

A B C
1 Last_Name First_Name Phone_Number
2 Lucas Jan ?

What formula can I enter in cell C2 to return the phone number from the
previous table? Note: The Last_Name, First_Name combination entered here
are
guaranteed to be in the prior table.

I know I can add a helper column to the first table where I concatenate last
name and first name together to form a single unique string, but I really
don't want to use a helper column if I can avoid it.


  #3   Report Post  
Gregg Riemer
 
Posts: n/a
Default

Thanks, That works. I've used array functions quite a bit before, so I think
I even understand why it works.

"RagDyer" wrote:

Try this *array* formula in C2:

=INDEX(Sheet1!$C$2:$C$10,MATCH(1,(Sheet1!$A$2:$A$1 0=A2)*(Sheet1!$B$2:$B$10=B
2),0))

And drag down to copy.

Array formulas are entered using CSE, <Ctrl <Shift <Enter, instead of the
regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Gregg Riemer" wrote in message
...
How do I do a table lookup with more than 1 criteria?

On Sheet1, I have a range containing Last Names, First Names, and Phone
Numbers. For example,

1 Last_Name First_Name Phone_Number
2 Smith Bob 555-1231
3 Jones Tom 555-6789
4 Smith Sue 555-2345
5 Anderson Tom 555-3456
etc...

This table is not sorted. There are may be multiple people with the same
last name (e.g. many Smiths) and multiple people with the same first name
(e.g. many Toms), but the combination of last name and first name is unique
(e.g. can't have two Tom Smiths).

What formula can I use to return the phone number when a last name and first
name are entered. For example, on Sheet2 I have

A B C
1 Last_Name First_Name Phone_Number
2 Lucas Jan ?

What formula can I enter in cell C2 to return the phone number from the
previous table? Note: The Last_Name, First_Name combination entered here
are
guaranteed to be in the prior table.

I know I can add a helper column to the first table where I concatenate last
name and first name together to form a single unique string, but I really
don't want to use a helper column if I can avoid it.



  #4   Report Post  
RagDyer
 
Posts: n/a
Default

Appreciate the feed-back.
--


Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------

"Gregg Riemer" wrote in message
...
Thanks, That works. I've used array functions quite a bit before, so I
think
I even understand why it works.

"RagDyer" wrote:

Try this *array* formula in C2:


=INDEX(Sheet1!$C$2:$C$10,MATCH(1,(Sheet1!$A$2:$A$1 0=A2)*(Sheet1!$B$2:$B$10=B
2),0))

And drag down to copy.

Array formulas are entered using CSE, <Ctrl <Shift <Enter, instead of

the
regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Gregg Riemer" wrote in message
...
How do I do a table lookup with more than 1 criteria?

On Sheet1, I have a range containing Last Names, First Names, and Phone
Numbers. For example,

1 Last_Name First_Name Phone_Number
2 Smith Bob 555-1231
3 Jones Tom 555-6789
4 Smith Sue 555-2345
5 Anderson Tom 555-3456
etc...

This table is not sorted. There are may be multiple people with the same
last name (e.g. many Smiths) and multiple people with the same first name
(e.g. many Toms), but the combination of last name and first name is

unique
(e.g. can't have two Tom Smiths).

What formula can I use to return the phone number when a last name and

first
name are entered. For example, on Sheet2 I have

A B C
1 Last_Name First_Name Phone_Number
2 Lucas Jan ?

What formula can I enter in cell C2 to return the phone number from the
previous table? Note: The Last_Name, First_Name combination entered here
are
guaranteed to be in the prior table.

I know I can add a helper column to the first table where I concatenate

last
name and first name together to form a single unique string, but I really
don't want to use a helper column if I can avoid it.




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
Question about combining data from multiple workbooks into one rep BookOpenandUpright Excel Discussion (Misc queries) 2 February 19th 05 12:37 PM
Can I get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
Return Multiple Results with Lookup Josh O. Excel Worksheet Functions 1 February 4th 05 08:07 PM
lookup multiple occurrences of a value excel ckl Excel Worksheet Functions 5 February 3rd 05 05:19 AM
How do I sum (like sumif) but predicated on multiple criteria, in. djpaik Excel Worksheet Functions 2 January 1st 05 01:12 PM


All times are GMT +1. The time now is 10:50 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"