mudstuffin
Technical User
I have two data ranges that I need to look for up to 10 instances of the same match and return the values in the next columns. I can get the Vlookup to check through both ranges to find the first match, but I can’t get it to return the next instances of the next match. I have two data ranges as my data has gone over the 65k rows. I could have maybe 6 rows with the same reference number, and I want to return up to ten matches.
Here is a typical set-up of the data…
data1
ref name date value
123456 bob 11/05/04 100
123456 bob 13/05/04 180
234567 james 16/05/04 250
456789 mike 19/05/04 50
data2
ref name date value
123456 bob 03/06/04 95
234567 james 06/06/04 125
123456 bob 07/06/04 85
I have used the below formula to look up the first match.
=IF(NOT(ISNA(VLOOKUP(B4,Data1,2,FALSE))),VLOOKUP(B4,Data1,2,FALSE),IF(ISNA(VLOOKUP(B4,data2,2,FALSE)),"No Match",VLOOKUP(B4,data2,2,FALSE)))
This finds the match and returns the name. I then have some more of these in the same row returning the different column lookups for date & value. What I need to do is the same for the other matches.
So when I am on the lookup sheet, I want to be able to type in 123456 in the search box, and it return 4 matches that look through both data ranges.
Ref name date value
123456 bob 11/05/04 100
123456 bob 13/05/04 180
123456 bob 03/06/04 95
123456 bob 07/06/04 85
The data is pulled from an external database and needs to be sorted by date, which means that the same reference can be in both ranges. Can anyone help on this one…..?
I hope it makes sense !
Thanks in advance.
mudstuffin