Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default lookups based on more than one column

Hello:

I'm not finding the LOOKUP, VLOOKUP, MATCH, and INDEX functions to be very
helpful for what I need.

I have a sheet of three columns. I want to return a value from the first
column based on corresponding values in the second AND third columns. In
other words, the value from column A is an exact match of what is in BOTH
column B AND C.

Is there a function in Excel that will allow for this?

Thanks!

childofthe1980s
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default lookups based on more than one column

Have you tried this?

Create another column to the left of the first column. Concatenate column 2
and column 3 and lookup your value in the new column. You need this new
column to the left of the original data as vlookup assumes the lookup value
is the left hand most column of the data table.


Hope this helps

Chris

"childothe1980s" wrote in message
...
Hello:

I'm not finding the LOOKUP, VLOOKUP, MATCH, and INDEX functions to be very
helpful for what I need.

I have a sheet of three columns. I want to return a value from the first
column based on corresponding values in the second AND third columns. In
other words, the value from column A is an exact match of what is in BOTH
column B AND C.

Is there a function in Excel that will allow for this?

Thanks!

childofthe1980s



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default lookups based on more than one column

The easiest way is to concatenate the contents of the two cells you want to
base your lookup on into a third column, and then use a VLookup on the new
column which contains both values. You can either use "=Concatenate(<cell1,
<cell2)" or "=<cell1 & <cell2" Where <Cell1 and <cell2 are the two cells
containing the two values you want to look up. You'll also have to do the
same to the values in your lookup table.

The other option would be to write your own custom function using Excel VBA
to manage the lookup for you. I suggest you use the first method if possible
- if that's no good, then we can look at the VBA function.

Ben.


"childothe1980s" wrote:

Hello:

I'm not finding the LOOKUP, VLOOKUP, MATCH, and INDEX functions to be very
helpful for what I need.

I have a sheet of three columns. I want to return a value from the first
column based on corresponding values in the second AND third columns. In
other words, the value from column A is an exact match of what is in BOTH
column B AND C.

Is there a function in Excel that will allow for this?

Thanks!

childofthe1980s

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default lookups based on more than one column

You can use this kind of syntax:

=index(othersheet!$c$1:$c$100,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))
(one cell)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.


childothe1980s wrote:

Hello:

I'm not finding the LOOKUP, VLOOKUP, MATCH, and INDEX functions to be very
helpful for what I need.

I have a sheet of three columns. I want to return a value from the first
column based on corresponding values in the second AND third columns. In
other words, the value from column A is an exact match of what is in BOTH
column B AND C.

Is there a function in Excel that will allow for this?

Thanks!

childofthe1980s


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default lookups based on more than one column

=Index(sheet1!R1:R30,Match(A1&B1&C1,Sheet1!F1:F30& Sheet1!M1:M30&Sheet1!Z1:Z3
0,0),1)

entered with Ctrl+Shift+Enter

--
Regards,
Tom Ogilvy


"childothe1980s" wrote in message
...
Hello:

I'm not finding the LOOKUP, VLOOKUP, MATCH, and INDEX functions to be very
helpful for what I need.

I have a sheet of three columns. I want to return a value from the first
column based on corresponding values in the second AND third columns. In
other words, the value from column A is an exact match of what is in BOTH
column B AND C.

Is there a function in Excel that will allow for this?

Thanks!

childofthe1980s





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
How to perform lookups based on multiple criteria? Brandon[_3_] Excel Worksheet Functions 4 October 19th 08 06:44 PM
multiple column lookups Mark B Excel Worksheet Functions 1 February 6th 06 09:58 PM
multiple column lookups Kevin Vaughn Excel Worksheet Functions 0 February 6th 06 09:36 PM
multiple column lookups Mark B Excel Worksheet Functions 0 February 6th 06 09:29 PM
multiple column lookups Kevin Vaughn Excel Worksheet Functions 0 February 6th 06 09:28 PM


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