in Details!A3
=IFERROR(INDEX(Master!$A$2:$J$10000,SMALL(IF((Master!$B$2:$B$10000=$A$1),ROW($A$2:$A$10000)),ROW(A1))-(ROW(A$2)-1),COLUMN()),"")
Array formula, use Ctrl-Shift-Enter
or if you can use AGGREGATE
=IFERROR(INDEX(Master!$A$2:J$10000,AGGREGATE(15,6,ROW(A2:A$10000)/(Master!$B$2:$B$10000=$A$1),ROWS(A$2:A2))-(2-1),COLUMN()),"")
This is NOT an array formula
Whichever formula you use copy it across and down for as many rows as you have on the Master data.
Bookmarks