See attached:
Formula in D1:
=COUNTIF(data!$A$2:$A$15,B1)
to give count of matches
Formula in A5:
=IF(ROWS($A$1:$A1)>$D$1,"",INDEX(data!B$2:B$15,SMALL(IF(data!$A$2:$A$15=$B$1,ROW(data!$A$2:$A$15)-ROW(data!$A$2)+1),ROWS($A$1:$A1))))
confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down to extract first column of matching info.
Formula in B5:
=IF(A5="","",VLOOKUP($A5,data!$B$2:$E$15,COLUMNS($A$1:B$1),FALSE))
normally Entered and copied down and across the rest of the table.
Note: If you change data ranges in the formula in A5, you will need to re-confirm with CSE keys to get the { } brackets and then copy down...
Bookmarks