Index match with multiple criteria - please help!

nicray

New Member
Joined
Jan 5, 2018
Messages
1
Hi

Please can anyone help me with the formula for INDEX MATCH with two lots of criteria.

Data:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Site
[/TD]
[TD]Code
[/TD]
[TD]Supplier
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]A0001
[/TD]
[TD]Company X
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]A0001
[/TD]
[TD]Company Y
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]A0001
[/TD]
[TD]Company C
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]A0001
[/TD]
[TD]Company Y
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]A0002
[/TD]
[TD]Company X
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]A0003
[/TD]
[TD]Company A
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]A0002
[/TD]
[TD]Company B
[/TD]
[/TR]
</tbody>[/TABLE]

Criteria:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Site
[/TD]
[TD]Code
[/TD]
[TD]Supplier/RESULT
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]A0001
[/TD]
[TD]Company X
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]A0001
[/TD]
[TD]Company Y
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]A0001
[/TD]
[TD]Company C
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]A0001
[/TD]
[TD]Company Y
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]A0002
[/TD]
[TD]0
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]A0003
[/TD]
[TD]0
[/TD]
[/TR]
[TR]
[TD]D
[/TD]
[TD]A0002
[/TD]
[TD]#REF!
[/TD]
[/TR]
</tbody>[/TABLE]

I've used the formula below but there seems to be a problem.
=INDEX($C$2:$C$13,MATCH(A17,$A$2:$A$13,0)*MATCH(B17,$B$2:$B$13,0))

Can anyone tell me where I am going wrong or if there is a better formula to use. My actual data is 000s of rows.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Is this what you want?


Excel 2010
ABC
1SiteCodeSupplier
2AA0001Company X
3BA0001Company Y
4CA0001Company C
5DA0001Company Y
6BA0002Company X
7BA0003Company A
8DA0002Company B
9
10
11
12
13
14
15
16SiteCodeSupplier/RESULT
17AA0001Company X
18BA0001Company Y
19CA0001Company C
20DA0001Company Y
21BA0002Company X
22BA0003Company A
23DA0002Company B
Sheet4
Cell Formulas
RangeFormula
C17{=INDEX($C$2:$C$8,MATCH(A17&B17,$A$2:$A$8&$B$2:$B$8,0))}
C18{=INDEX($C$2:$C$8,MATCH(A18&B18,$A$2:$A$8&$B$2:$B$8,0))}
C19{=INDEX($C$2:$C$8,MATCH(A19&B19,$A$2:$A$8&$B$2:$B$8,0))}
C20{=INDEX($C$2:$C$8,MATCH(A20&B20,$A$2:$A$8&$B$2:$B$8,0))}
C21{=INDEX($C$2:$C$8,MATCH(A21&B21,$A$2:$A$8&$B$2:$B$8,0))}
C22{=INDEX($C$2:$C$8,MATCH(A22&B22,$A$2:$A$8&$B$2:$B$8,0))}
C23{=INDEX($C$2:$C$8,MATCH(A23&B23,$A$2:$A$8&$B$2:$B$8,0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I dont get what you expect exact but may be:

=INDEX($C$2:$C$13,MATCH(A17&B17,$A$2:$A$13&$B$2:$B$13,0))

I think it's an array formula so Ctrl+Shift+Enter
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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