Something like attached?
For IN Columns.
Formula:
=IFERROR(INDEX(Attendance!$C$2:$C$126,AGGREGATE(15,6,(ROW($2:$126)-1)/(Attendance!$A$2:$A$126=$B3),ROUNDUP(COLUMNS($A:A)/2,0))),"")
For OUT Columns.
Formula:
=IFERROR(INDEX(Attendance!$E$2:$E$126,AGGREGATE(15,6,(ROW($2:$126)-1)/(Attendance!$A$2:$A$126=$B3),ROUNDUP(COLUMNS($A:B)/2,0))),"")
Though personally, I prefer to use PQ for this sort of transformation.
Bookmarks