Try this Array Formula. Since this is an an array formula so you need to confirm it with Ctrl+Shift+Enter instead of just Enter. (i.e. after placing the formula in the cell, hold down the Ctrl+Shift and then press Enter.)
In A3
then drag across and down.![]()
=IFERROR(INDEX(January!$A$2:$A$8,SMALL(IF(January!$B$2:$B$8=A$1,ROW(January!$A$2:$A$8)-ROW(January!$A$2)+1),ROWS(A$3:A3))),"")
Bookmarks