Ozymandius welcome to the forum.
In the attached find two helper columns in 'Match Data'. These establish the lower and upper boundary row number for each individual and years >= YEAR.
In D2 and filled down.
Formula:
=MATCH(1,INDEX(1/(($A2='Raw Data'!$A$2:$A$373)*($B2='Raw Data'!$B$2:$B$373)*('Raw Data'!$C$2:$C$373>=C2)),0),0)
In E2 and filled down.
Formula:
=MATCH(2,INDEX(1/(($A2='Raw Data'!$A$2:$A$373)*($B2='Raw Data'!$B$2:$B$373)*('Raw Data'!$C$2:$C$373>=$C2)),0),1)
Then there is a duplicate Result sheet 'Result Set (2)'. Find a helper column A inserted to the left. It has an array formula that returns each relevant row number from 'Raw Data'. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter. Fill down until you get blanks.
Formula:
=IFERROR(SMALL(IF((ROW('Raw Data'!$A$2:$A$373)-MIN(ROW('Raw Data'!$A$2:$A$373))+1>=
TRANSPOSE('Match Data'!$D$2:$D$6))*(ROW('Raw Data'!$A$2:$A$373)-MIN(ROW('Raw Data'!$A$2:$A$373))+1<=
TRANSPOSE('Match Data'!$E$2:$E$6)),ROW('Raw Data'!$A$2:$A$373)-MIN(ROW('Raw Data'!$A$2:$A$373))+1),ROWS($2:2)),"")
Then in B2 filled down and across until you get blanks. This is also array entered.
Formula:
=IFERROR(INDEX(IF(ISNUMBER('Raw Data'!A$2:A$373),'Raw Data'!A$2:A$373,'Raw Data'!A$2:A$373&""),$A2),"")
Bookmarks