Index Match Multiple Criteria and Return Multiple Unique Values

rvande22

New Member
Joined
Jun 10, 2016
Messages
2
I'm trying to create an array formula based on data in 2 separate tables. The formula should evaluate the data in table 2 and look for exact matches based on the data in table 1. When it finds an exact match, it will return the value in the "Order #" column in table 2 to the "Order #" column in table 1. Once the formula finds the unique value in table 2, it should then look for the next unique value in table 2 that matches all the criteria in table 1.

Table 1 below shows the desired result. The formula will be in table 1 "Order #" column. In the example below, the formula looked in table 2 for an exact match (12258, Red, Tan) and found two values (268, 657). It returned each unique matching value to the "Order #" column in table 1.

I'm able to use an Index Match formula to evaluate for multiple criteria, but I can't figure out how to find a matching value in table 2, then continue evaluating table 2 to find the next matching value. I can only find the first matching value (as shown in my "Error Table" The purpose in doing this is to match customer orders with product that has already been produced and can be shipped immediately. Your help is greatly appreciated!

Table 1
Order #ModelExt ColorInt Color
26812258RedTan
65712258RedTan
12258RedTan
12258RedTan

<tbody>
</tbody>








Table 2
Order #ModelExt ColorInt Color
26812258RedTan
38512258BlackTan
65712258RedTan
91512258RedOrange

<tbody>
</tbody>








ERROR Table

Order #ModelExt ColorInt Color
26812258RedTan
26812258RedTan
26812258RedTan
26812258RedTan

<tbody>
</tbody>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
maybe something like...

ABCD
1Table 1
2Order #ModelExt ColorInt Color
326812258RedTan
465712258RedTan
512258RedTan
612258RedTan
7
8Table 2
9Order #ModelExt ColorInt Color
1026812258RedTan
1138512258BlackTan
1265712258RedTan
1391512258RedOrange

<tbody>
</tbody>
Sheet4

Worksheet Formulas
CellFormula
A3=IFERROR(INDEX($A$10:$A$13,AGGREGATE(15,6,(ROW($A$10:$A$13)-ROW($A$10)+1)/(($B$10:$B$13=B3)*($C$10:$C$13=C3)*($D$10:$D$13=D3)),ROWS($A$3:A3))),"")

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
Thanks Weazel...the tables are in different workbooks and the data is generated in each table using VBA code that extracts data from the mainframe. Each table contains about 50 columns and up to 60K or 70K rows. I'm only attempting to extract a small amount of data, but the raw data file is pretty big. I guess I'm just saying I can't easily combine the tables.
 
Upvote 0
i'm not sure i follow, the tables aren't combined.

you would need to modify the formula depending on how your data is set up.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,825
Members
449,470
Latest member
Subhash Chand

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