Using Multiple Criteria in Index Match Array formula

dpkdileep

New Member
Joined
Jul 27, 2019
Messages
7
Hi,

I was using an Index Match Array formula to get multiple results according to one criteria.

In this formula, I am able to get the list of names for location "XX". That is A, D, E.

{=INDEX($A$2:$A$6,SMALL(IF(ISNUMBER(MATCH($D$2:$D$6,Location,0)),MATCH(ROW($D$2:$D$6),ROW($D$2:$D$6)),""),ROWS($E$1:E1)))}

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Age[/TD]
[TD]Qualification[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]21[/TD]
[TD]AAA[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]21[/TD]
[TD]AAA[/TD]
[TD]YY[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]25[/TD]
[TD]BBB[/TD]
[TD]ZZ[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]21[/TD]
[TD]AAA[/TD]
[TD]XX[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]20[/TD]
[TD]BBB[/TD]
[TD]XX[/TD]
[/TR]
</tbody>[/TABLE]


Now, I have come across a scenario where I need to use two criteria. That is, Qualification and Location.
For example, I need the Names where the qualification is "AAA" and location is "XX".

Can someone help me in modifying the formula to get the above result.

Thanks in advance

Regards
Deepak
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
If you have Excel 2010 or later try:
Copy formula down as needed.
Excel Workbook
ABCD
1NameAgeQualificationLocation
2A21AAAXX
3B21AAAYY
4C25BBBZZ
5D21AAAXX
6E20BBBXX
7
8LocationQualification
9MatchXXAAA
10
11Name
12A
13D
Sheet
 
Upvote 0
Hi & welcome to MrExcel.
How about


Book1
ABCDEFG
1NameAgeQualificationLocationXXAAA
2A21AAAXXA
3B21AAAYYD
4C25BBBZZ
5D21AAAXX
6E20BBBXX
Roster
Cell Formulas
RangeFormula
G2=IFERROR(INDEX($A$2:$A$6,AGGREGATE(15,6,(ROW($A$2:$A$6)-ROW($A$2)+1)/(($C$2:$C$6=$G$1)*($D$2:$D$6=$F$1)),ROWS($A$1:$A1))),"")
 
Upvote 0
Thanks Fluff & AhoyNC.

I have run this with my data and it is perfectly working fine. Thanks for your support.

I have one more question on this.

What changes do I have to make if I need to add one more criteria in the location column?

For example,
Qualification = AAA & Location = XX
Qualification = AAA & Location = ZZ.

Is it possible to add multiple criteria in the same column "Location"?

The result I am looking for is A, C, and D (not particularly in this order. all these three should be coming as results).

Please help.

Thanks in advance for your support.
 
Upvote 0
Maybe


Book1
ABCDEFG
1NameAgeQualificationLocationXXAAA
2A21AAAXXYYA
3B21AAAYYB
4C25BBBZZD
5D21AAAXX
6E20BBBXX
Roster
Cell Formulas
RangeFormula
G2=IFERROR(INDEX($A$2:$A$6,AGGREGATE(15,6,(ROW($A$2:$A$6)-ROW($A$2)+1)/(($C$2:$C$6=$G$1)*(($D$2:$D$6=$F$1)+($D$2:$D$6=$F$2))),ROWS($A$1:$A1))),"")
 
Upvote 0
Thanks for the reply. It worked well. I have tweaked it a bit to match my requirements. Apologies from my side for not saying this at the time of answer.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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