Try like this:
Excel 2016 (Windows) 32 bit
J K L 6=TEXTJOIN(",",1,IF($C$6:$C$31=I6,$B$6:$B$31,"")) =VLOOKUP(I6,C: D,2,0) =SUBSTITUTE(TEXTJOIN("/",1,IF(($C$6:$C$31=I6),$D$6:$G$31,"")),"//","")
Sheet: Data
J & L are array formulas so accept with Ctrl+Shift+Enter and drag it down.
Excel 2016 (Windows) 32 bit
D E F G 8=INDEX(Data!C:C,SMALL(IF(Data!$B$6:$B$31='Final Output'!$B$4,ROW(Data!$C$6:$C$31),10^9),ROW()-7)) =VLOOKUP($D8,Data!$I:$L,(COLUMN()-3),0) =VLOOKUP($D8,Data!$I:$L,(COLUMN()-3),0) =VLOOKUP($D8,Data!$I:$L,(COLUMN()-3),0)
Sheet: Final Output
Formula in D is array so as above (CSE) to accept and drag it down.