Assuming the table is in Sheet1!A1:B10 (adjust ranges and names as necessary)....
Try:
=IFERROR(INDEX(Sheet1!$A$2:$A$10,SMALL(IF(Sheet1!$B$2:$B$10="Y",ROW(Sheet1!$A$2:$A$10)-ROW(Sheet1!$A$2)+1),ROWS($A$2:$A2))),"")
You need to confirm the formula with CTRL+SHIFT+ENTER not just ENTER, then you can copy it down as far as you need to ensure all names are captured (suggest to copy down same distance as original table).
repeat with similar formula replacing Sheet1!$B$2:$B$10="Y" with Sheet1!$B$2:$B$10="I" for other critera.
Bookmarks