Hello,

I've got a formula that will look at a unique ID and match that to an array that has multiple records sorted in ascending order by unique id. My goal is to match the ID and return only the applicable record(s). My problem is that sometimes the number of records are inconsistent. One ID may have two records another one may have 4 (or even none). My current formula takes a lot of proofreading because of this and I am hoping to do more proofing in the formula. Any help is greatly appreciated. Here is what I have:

A7:
Formula: copy to clipboard
=IF(INDEX(Records!$A$1:$F$650,MATCH(Data!$A$1,Records!$A$1:$A$650,0),2)="","",INDEX(Records!$A$1:$F$650,MATCH(Data!$A$1,Records!$A$1:$A$650,0),2))

A8:
Formula: copy to clipboard
=IF(INDEX(Records!$A$1:$F$650,MATCH(Data!$A$1,Records!$A$1:$A$650,0)+1,2)="","",INDEX(Records!$A$1:$F$650,MATCH(Data!$A$1,Records!$A$1:$A$650,0)+1,2))
<--Looks at next row in list
A9:
Formula: copy to clipboard
=IF(INDEX(Records!$A$1:$F$650,MATCH(Data!$A$1,Records!$A$1:$A$650,0)+2,2)="","",INDEX(Records!$A$1:$F$650,MATCH(Data!$A$1,Records!$A$1:$A$650,0)+2,2))
<--Looks at the 2nd row in the list
relative to starting cell