Thank you, that is much clearer. Here are 3 options for you to consider. I have placed them in columns Q:S but you can use column J once you have decided which one suits you best. I have also hidden some columns to make my screen shot a bit smaller.
Each formula is copied down.
The formula in Q2 requires Excel 2016 through Office 365 and is an array formula so should be entered without the {} but confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will insert the {}. The formula can then be copied down.
The formula in R2 should work in all versions but is obviously much longer, especially if you have a lot of shifts.
The formula in S2 is a user-defined function. To implement it ..
1. Right click the sheet name tab and choose "View Code".
2. In the Visual Basic window use the menu to Insert|Module
3. Copy and Paste the code below into the main right hand pane that opens at step 2.
4. Close the Visual Basic window.
5. Enter the formula as shown in the screen shot below and copy down.
6. Your workbook will need to be saved as a macro-enabled workbook (*.xlsm)
| A | B | C | D | E | F | G | H | I | J | Q | R | S |
| Excel 2016 | Earlier | UDF | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | | |
| | | Missing: AM1, PM6 | Missing: AM1, PM6 | Missing: AM1, PM6 | | | | | | | | |
| | | | | | | | | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | | |
| | | | | | | | | | | | | |
| | | | | | | | | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | | |
| | | | | | | | | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | Missing: AM Cook, PM Cook, AM1, AM2, AM3, PM4, PM5, PM6 | | |
<colgroup><col style="font-weight:bold; width:30px; "><col style="width:42px;"><col style="width:73px;"><col style="width:73px;"><col style="width:48px;"><col style="width:54px;"><col style="width:48px;"><col style="width:48px;"><col style="width:70px;"><col style="width:70px;"><col style="width:24px;"><col style="width:239px;"><col style="width:239px;"><col style="width:239px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]
[TD="align: right"]Day[/TD]
[TD="align: center"]AM Cook[/TD]
[TD="align: center"]PM Cook[/TD]
[TD="align: center"]AM1[/TD]
[TD="align: center"]AM2[/TD]
[TD="align: center"]AM3[/TD]
[TD="align: center"]PM4[/TD]
[TD="align: center"]PM5[/TD]
[TD="align: center"]PM6[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]Bob[/TD]
[TD="align: center"]George[/TD]
[TD="align: center"]Terry[/TD]
[TD="align: center"]Lenny[/TD]
[TD="align: center"]Mark[/TD]
[TD="align: center"]Mike[/TD]
[TD="align: center"]Sebough[/TD]
[TD="align: center"]Marty[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]Les[/TD]
[TD="align: center"]Steve[/TD]
[TD="align: center"]Lenny[/TD]
[TD="align: center"]Terry[/TD]
[TD="align: center"]Mark[/TD]
[TD="align: center"]Sebough[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]
[TD="align: center"]4[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]Sam[/TD]
[TD="align: center"]Bob[/TD]
[TD="align: center"]Terry[/TD]
[TD="align: center"]Lenny[/TD]
[TD="align: center"]Mark[/TD]
[TD="align: center"]Mike[/TD]
[TD="align: center"]Marty[/TD]
[TD="align: center"]Sebough[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]7[/TD]
[TD="align: center"]6[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]8[/TD]
[TD="align: center"]7[/TD]
</tbody>