Return the nth array value based on two criterias

L

Legacy 143009

Guest
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]PRODUCT NAME[/TD]
[TD]TYPE[/TD]
[TD]BRAND[/TD]
[/TR]
[TR]
[TD]PRODUCT1[/TD]
[TD]A[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD]PRODUCT2[/TD]
[TD]A[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD]PRODUCT3[/TD]
[TD]B[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD]PRODUCT4[/TD]
[TD]B[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]PRODUCT5[/TD]
[TD]B[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]


I have the table above. I want to match a product array wtih two conditions. And return the values in an order:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]B[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PRODUCT4[/TD]
[TD]PRODUCT5[/TD]
[/TR]
[TR]
[TD]Z[/TD]
[TD]PRODUCT1[/TD]
[TD]PRODUCT2[/TD]
[TD][/TD]
[TD]PRODUCT3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I've tried {=INDEX(Table1!A:A,MATCH(B1&A2;Table1!B:B&Table1!C:C,0))}
But it returns the first match value. When I copy to right it doesnt update product names.
For example nth value can be determined by column number.

Thanks
 
Last edited by a moderator:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
See if you can use this, copied across and down.

Excel Workbook
ABCDEFG
1PRODUCT NAMETYPEBRAND
2PRODUCT1AZ
3PRODUCT2AZ
4PRODUCT3BZ
5PRODUCT4BX
6PRODUCT5BX
7
8
9AAABBB
10X PRODUCT4PRODUCT5
11ZPRODUCT1PRODUCT2PRODUCT3
Extract from array
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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