LOOKUP Multiple criteria

Pat Mor

New Member
Joined
Jan 30, 2014
Messages
8
Hello
I have data in A5 - E16 and need a result in H2 and H3 based on criteria, see below example
Cell H2 : result = V1
Criteria 1 : 100 in column B
Criteria 2 : Z in column A
Lookup which data in Row 8 (cells C8 - D8 - E8) matches in column A

Is this possible without an array formula ?

Regards

Data table.JPG
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
What criteria are you using for H3 to return V7 instead of V5 ?
Here is an option without the column selection part

Book4
ABCDEFGHI
1CriteriaZ<-- Criteria
2100V1
3200V5
4
5Info 1Info 2Info 3
6P1100
7P2100
8Z100V1V2V3
9P3200
10Z200V5V7V10
11P4300
12V1300
13V4300
14P4300
15V6300
16V7300
Sheet1
Cell Formulas
RangeFormula
H2:H3H2=LOOKUP(2, 1/ (($B$6:$B$16=G2) * ($A$6:$A$16=$H$1)), $C$6:$C$16)
 
Upvote 0
The requirement statement was to look for Z in column A.
Z is on rows 8 and 10.
So if you want V7 with a column A requirement of "Z" and a column B requirement of 200, it has to look in Info 2.
There is no criteria to tell it to do so.
 
Upvote 0
Hi Alex

Correct there is no criteria to look in which info column.
I was thinking of first looking for column C, if no match, look for column D, if still no match, look for column E
e.g. =+IFNA(VLOOKUP(C8;A:A;1;FALSE);IFNA(VLOOKUP(D8;A:A;1;FALSE);VLOOKUP(E8;A:A;1;FALSE)))

But how do I combine this in one cell with the other criteria in H1 and G2 ?

Regards
 
Upvote 0
If you don't have MS365 or Excel 2021 then the formula is going to get quite long.
A not found (NA) is quite different to it having a blank in Info 1 and/or info 2

20230103 MultiCriteria Lookup Pat Mor.xlsx
ABCDEFGHI
1CriteriaZ<-- Criteria
2100V1
3200V7
4
5Info 1Info 2Info 3
6P1100
7P2100
8Z100V1V2V3
9P3200
10Z200V7V10
11P4300
12V1300
13V4300
14P4300
15V6300
16V7300
Sheet1 V02
Cell Formulas
RangeFormula
H2:H3H2=IF(LOOKUP(2,1/(($B$6:$B$16=G2)*($A$6:$A$16=$H$1)),$C$6:$C$16)<>"",LOOKUP(2,1/(($B$6:$B$16=G2)*($A$6:$A$16=$H$1)),$C$6:$C$16), IF(LOOKUP(2,1/(($B$6:$B$16=G2)*($A$6:$A$16=$H$1)),$D$6:$D$16)<>"",LOOKUP(2,1/(($B$6:$B$16=G2)*($A$6:$A$16=$H$1)),$D$6:$D$16), IF(LOOKUP(2,1/(($B$6:$B$16=G2)*($A$6:$A$16=$H$1)),$E$6:$E$16)<>"",LOOKUP(2,1/(($B$6:$B$16=G2)*($A$6:$A$16=$H$1)),$E$6:$E$16), "")))
 
Upvote 0

Forum statistics

Threads
1,215,078
Messages
6,122,996
Members
449,093
Latest member
masterms

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top