Multiple Criteria Lookup

nburaq

Board Regular
Joined
Apr 2, 2021
Messages
220
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,
I have two tables. First one, the table extracted from pivot table ( which is not ordered how I want ) and second one is empty table (which How I want to represent for "Found" values). I have so far tried filter and index match combination but I could not succeed. It might be the reason my mind is so messy today. I will be so glad if you could help me.

Thanks in advance!

1st table: (Range is A1:G13)

LocationD5B1B2B3A1B4
ITALY
Found
320​
191​
206​
232​
244​
200​
Not Found
1​
4​
7​
8​
22​
41​
FRANCE
Found
46​
35​
20​
15​
16​
4​
Not Found
62​
89​
81​
61​
129​
58​
GERMANY
Found
183​
167​
163​
27​
76​
24​
Not Found
74​
83​
92​
227​
176​
230​
AUSTRIA
Found
180​
129​
186​
100​
131​
157​
Not Found
18​
80​
48​
61​
72​
51​


2nd table (Range is K1:Q5)

FoundA1B1B2B3B4D5
AUSTRIA
FRANCE
GERMANY
ITALY
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Is this what you mean?

23 09 11.xlsm
ABCDEFGHIJKLMNOPQ
1LocationD5B1B2B3A1B4FoundA1B1B2B3B4D5
2ITALYAUSTRIA131129186100157180
3Found320191206232244200FRANCE16352015446
4Not Found14782241GERMANY761671632724183
5FRANCEITALY244191206232200320
6Found46352015164
7Not Found6289816112958
8GERMANY
9Found183167163277624
10Not Found748392227176230
11AUSTRIA
12Found180129186100131157
13Not Found188048617251
nburaq
Cell Formulas
RangeFormula
L2:Q5L2=INDEX($B$2:$G$13,MATCH($K2:$K5,$A$2:$A$13,0)+1,MATCH(L$1:Q$1,$B$1:$G$1,0))
Dynamic array formulas.
 
Upvote 1
Solution
Perfect! Thanks for the solution. This is exactly what I was looking for.
 
Upvote 0
You are welcome. Thanks for the follow-up. :)
Just to end my curiosity and do some brain storm, is it possible to apply this formula to solve the same problem
=INDEX($A$2:$G$13;MATCH(1;(($A$2:$A$13="Found")*($A$2:$A$13=$K2)*($B$1:$G$1=$L1);0))
because it seemed to me as multiple criteria issue
Thanks again
 
Upvote 0
Just to end my curiosity and do some brain storm, is it possible to apply this formula to solve the same problem
=INDEX($A$2:$G$13;MATCH(1;(($A$2:$A$13="Found")*($A$2:$A$13=$K2)*($B$1:$G$1=$L1);0))
because it seemed to me as multiple criteria issue
That formula does not make sense to me
($A$2:$A$13="Found")*($A$2:$A$13=$K2)
Assuming K2 is "AUSTRIA", how can any cell in A2:A13 be equal to both "Found" and "AUSTRIA"?

You could use this formula in L2
Excel Formula:
=INDEX($B$3:$G$13,MATCH(1,($A$3:$A$13="Found")*($A$2:$A$12=$K2),0),MATCH(L$1,$B$1:$G$1,0))
or this one
Excel Formula:
=SUMPRODUCT(($A$3:$A$13="Found")*($A$2:$A$12=$K2)*($B$1:$G$1=L$1),$B$3:$G$13)
but both of these would need to be copied to all the other cells in the result range whereas the post #2 formula only needs to be place in cell L2
 
Upvote 1
Sorry for my late reply but you are absolutely right both formula also works. I will use it first solution since it is easier to apply.
 
Upvote 0

Forum statistics

Threads
1,215,084
Messages
6,123,029
Members
449,092
Latest member
ikke

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