Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default VLOOKUP on 2 sets of criteria

My data set looks something like this.

Test Name Level Spec
Test 1 8 -32
Test 1 9 -32
Test 1 10 -32
Test 1 11 -34
Test 1 12 -34
Test 2 8 -28
Test 2 9 -29
Test 2 10 -31
Test 2 11 -32
Test 2 12 -32

I would like to be able to do a VLOOKUP on Spec, based on a combination of
TestName AND Level

Is this possible?

Thanks
sandy


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default VLOOKUP on 2 sets of criteria

One way:

=SUMPRODUCT(--(A2:A1000="Test 1"),--(B1:B1000=10),C1:C1000)

In article ,
Sandy wrote:

My data set looks something like this.

Test Name Level Spec
Test 1 8 -32
Test 1 9 -32
Test 1 10 -32
Test 1 11 -34
Test 1 12 -34
Test 2 8 -28
Test 2 9 -29
Test 2 10 -31
Test 2 11 -32
Test 2 12 -32

I would like to be able to do a VLOOKUP on Spec, based on a combination of
TestName AND Level

Is this possible?

Thanks
sandy

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default VLOOKUP on 2 sets of criteria

=Index(C:C,Match("Test 110",$A$1:$A$100&$B$1:$B$100,0),1)

entered with Ctrl+shift+Enter rather than just enter since this is an array
formula.

--
Regards,
Tom Ogilvy

"Sandy" wrote:

My data set looks something like this.

Test Name Level Spec
Test 1 8 -32
Test 1 9 -32
Test 1 10 -32
Test 1 11 -34
Test 1 12 -34
Test 2 8 -28
Test 2 9 -29
Test 2 10 -31
Test 2 11 -32
Test 2 12 -32

I would like to be able to do a VLOOKUP on Spec, based on a combination of
TestName AND Level

Is this possible?

Thanks
sandy


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default VLOOKUP on 2 sets of criteria

OK - i think I get this logic - thanks!

I have one question:
"Test 110" - this is a concatenation of the values [Test Name = test 1 and
level = 10] in the two fields that I want to look up on, correct?

However, since i need to look up a different value for thousands of records,
I want to create a formula to concatenate the fields and then use a cell
reference instead of specific text.

=INDEX(C:C,MATCH(G2,$A$1:$A$100&$B$1:$B$100,0),1)

Where G2 hold the concatenated value for that record.

This gave me a "VALUE" error... what am i missing here?

Thanks!

"Tom Ogilvy" wrote:

=Index(C:C,Match("Test 110",$A$1:$A$100&$B$1:$B$100,0),1)

entered with Ctrl+shift+Enter rather than just enter since this is an array
formula.

--
Regards,
Tom Ogilvy

"Sandy" wrote:

My data set looks something like this.

Test Name Level Spec
Test 1 8 -32
Test 1 9 -32
Test 1 10 -32
Test 1 11 -34
Test 1 12 -34
Test 2 8 -28
Test 2 9 -29
Test 2 10 -31
Test 2 11 -32
Test 2 12 -32

I would like to be able to do a VLOOKUP on Spec, based on a combination of
TestName AND Level

Is this possible?

Thanks
sandy


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default VLOOKUP on 2 sets of criteria

Pls ignore this last question - I have it working with a cell reference.

Thanks!
sandy

"Sandy" wrote:

OK - i think I get this logic - thanks!

I have one question:
"Test 110" - this is a concatenation of the values [Test Name = test 1 and
level = 10] in the two fields that I want to look up on, correct?

However, since i need to look up a different value for thousands of records,
I want to create a formula to concatenate the fields and then use a cell
reference instead of specific text.

=INDEX(C:C,MATCH(G2,$A$1:$A$100&$B$1:$B$100,0),1)

Where G2 hold the concatenated value for that record.

This gave me a "VALUE" error... what am i missing here?

Thanks!

"Tom Ogilvy" wrote:

=Index(C:C,Match("Test 110",$A$1:$A$100&$B$1:$B$100,0),1)

entered with Ctrl+shift+Enter rather than just enter since this is an array
formula.

--
Regards,
Tom Ogilvy

"Sandy" wrote:

My data set looks something like this.

Test Name Level Spec
Test 1 8 -32
Test 1 9 -32
Test 1 10 -32
Test 1 11 -34
Test 1 12 -34
Test 2 8 -28
Test 2 9 -29
Test 2 10 -31
Test 2 11 -32
Test 2 12 -32

I would like to be able to do a VLOOKUP on Spec, based on a combination of
TestName AND Level

Is this possible?

Thanks
sandy


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
vlookup with 4 sets of criteria to match? confused Excel Worksheet Functions 0 October 22nd 09 12:19 AM
IF FUCTION WITH 2 SETS OF CRITERIA Mark D[_2_] Excel Worksheet Functions 7 September 18th 09 07:49 AM
Vlookup for 2 sets of Criteria (or do I need to use something else Buzz07 Excel Discussion (Misc queries) 9 August 23rd 07 10:16 PM
vlookup with 2 sets of criteria laf2day Excel Discussion (Misc queries) 2 June 9th 07 03:36 AM
SUMIF with two sets of criteria luvthavodka Excel Discussion (Misc queries) 5 May 29th 06 08:02 PM


All times are GMT +1. The time now is 02:43 PM.

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"