In A4 of AMPM sheet:
=IF(ROWS($A$1:$A1)>COUNTIF('Daily Roster'!B$2:B$5,"AM"),"",INDEX('Daily Roster'!$A$2:$A$5,SMALL(IF('Daily Roster'!B$2:B$5="AM",ROW('Daily Roster'!B$2:B$5)-ROW('Daily Roster'!B$2)+1),ROWS($A$1:$A1))))
confirmed with CTRL+SHIFT+ENTER not just ENTER, then copied down and across the top table.
in A12:
=IF(ROWS($A$1:$A1)>COUNTIF('Daily Roster'!B$2:B$5,"PM"),"",INDEX('Daily Roster'!$A$2:$A$5,SMALL(IF('Daily Roster'!B$2:B$5="PM",ROW('Daily Roster'!B$2:B$5)-ROW('Daily Roster'!B$2)+1),ROWS($A$1:$A1))))
confirmed with CTRL+SHIFT+ENTER not just ENTER, then copied down and across the bottom table.
Bookmarks