Index & Match / Vlookup Help

Higenbo

New Member
Joined
Mar 2, 2017
Messages
10
Hi,

I have two data sets. They are identical apart from one has an additional field that I want to Index & Match and return to my data set. The issue I am facing is I have instances that have multiple occurrences for my criteria.

Example

My Data

Col A Col B
1 ABC123
2 ABC123
3 ABC123


Data set I want to return Col E field back to my data set

Col D Col E
1 ABC123 XYZ123
2 ABC123 XYZ456
3 ABC123 XYZ789

So I need the Index and Match function to know there are three potential results that can be returned for my criteria 'ABC123' and return the first, then second and third.

My data set is live and keeps growing in volume with fields that are blank. I need to obtain these from a flat file and just investigate any new occurrences. I have no way of allocating a unique ID to my original data either within our system. Which is why I need a formula.

Help!!!

Cheers
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
in Sheet1!C1
=IFERROR(INDEX(Sheet2!$E$1:$E$3,AGGREGATE(15,6,ROW(Sheet2!$E$1:$E$3)/(Sheet2!$B1:$B3=B1),ROWS(A$1:A1))-(1-1),1),"")

This assumes Sheet1 is first data set with result appearing in column C
and second data set is on Sheet2

Amend formula as necessary
 
Upvote 0
Thanks for the response. I can't get that to work. Looking back the above didn't come out very clear.

So for the below the formula in B1 would be

=IFERROR(INDEX($B$6:$B$8,AGGREGATE(15,6,ROW($B$6:$B$8)/($A6:$A8=A1),ROWS(A$1:A1))-(1-1),1),"")?

Thanks

AB
1ABC123
2ABC123
3ABC123
4
5Data set 2
6ABC123XYZ123
7ABC123XYZ456
8ABC123XYZ789
9

<tbody>
</tbody>
 
Upvote 0
My mistake

try

in B1
=IFERROR(INDEX($B$6:$B$8,AGGREGATE(15,6,ROW($A$6:$A$8)/($A$6:$A$8=A1),ROWS(A$1:A1))-(6-1),1),"")
and copy down to B3

The formula is a fairly standard response (though I've modified it a little) and mostly used when removing blanks from a list, though it can be any condition.

=IFERROR(INDEX(range,AGGREGATE(15,6,ROW(range)/(range to check and condition),ROWS(first cell reference with anchored row - first row))-(first row-1),column),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,759
Members
449,048
Latest member
excelknuckles

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