Try this Array Formula on Sheet 1 in cell A4. Since this is an array formula so you need to confirm it with Ctrl+Shift+Enter instead of just Enter. (i.e. hold down the Ctrl+Shift and then press Enter)
=IFERROR(INDEX('Master Log'!A$2:A$20,INDEX(ROW('Master Log'!$C$2:$F$20)-ROW('Master Log'!$C$2)+1,SMALL(IF(INDEX('Master Log'!$C$2:$F$20,0,MATCH("Sheet 1",'Master Log'!$C$1:$F$1,0))="X",ROW('Master Log'!$C$2:$F$20)-ROW('Master Log'!$C$2)+1),ROWS(A$4:A4)))),"")
and then drag across and down.
If this is what you are trying to achieve, for further sheets you need to change the sheet name in the formula. For ex. on sheet 2, change the sheet name in the formula inside the match function to sheet 2 and same for other sheets as well.
For detail see the attached sheet.
Bookmarks