This will account for the 8.5 type senario, as for the shifts ending overnight, technicaly they would move into the next day so ill have to think about how to make that work with your current set up (or you could extend your time ranges into the late night)
=IF(AND(TIMEVALUE('Labour Projection and Rosters'!E$9&":"&TEXT(('Labour Projection and Rosters'!E$9-INT('Labour Projection and Rosters'!E$9))*60,"00 ")&'Labour Projection and Rosters'!F$9)<=$A3,TIMEVALUE(INT('Labour Projection and Rosters'!G$9)&":"&TEXT(('Labour Projection and Rosters'!G$9-INT('Labour Projection and Rosters'!G$9))*60,"00 ")&'Labour Projection and Rosters'!H$9)+IF(AND('Labour Projection and Rosters'!F9="PM",'Labour Projection and Rosters'!H9="AM"),0.5,0)>=A3),1,0)
Bookmarks