Spreadsheet: 850212d1700582773-interval-staffing-formula-not-working-correctly-when-shifts-cross-midnight-interval-template-jadams169-
Sheet: Data

 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | In time | Out Time | Cross Midnight? |  |  | Over Midnight | Within Day | Combined Formula
 |  |  |  | Paste Here-> |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 |  |  |  |  |  | 00:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 01:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 21:00:00 | 2024-01-01 09:00:00 | 12 | 2023-12-31 21:00:00 | 2024-01-01 09:00:00 | 12 |  |  |  |  |  | 02:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 |  |  |  |  |  | 03:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 04:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 05:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 06:00:00 | 2023-12-31 18:00:00 | 12 | 2023-12-31 06:00:00 | 2023-12-31 18:00:00 | 12 |  |  |  |  |  | 06:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 07:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 20:00:00 | 2024-01-01 09:00:00 | 13 | 2023-12-31 20:00:00 | 2024-01-01 09:00:00 | 13 |  |  |  |  |  | 08:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 06:00:00 | 2023-12-31 18:00:00 | 12 | 2023-12-31 06:00:00 | 2023-12-31 18:00:00 | 12 |  |  |  |  |  | 09:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 14:00:00 | 2024-01-01 02:00:00 | 12 | 2023-12-31 14:00:00 | 2024-01-01 02:00:00 | 12 |  |  |  |  |  | 10:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 11:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 12:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 13:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 20:00:00 | 2024-01-01 08:00:00 | 12 | 2023-12-31 20:00:00 | 2024-01-01 08:00:00 | 12 |  |  |  |  |  | 14:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 |  |  |  |  |  | 15:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 |  |  |  |  |  | 16:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 |  |  |  |  |  | 17:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 |  |  |  |  |  | 18:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 19:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 05:00:00 | 2023-12-31 17:00:00 | 12 | 2023-12-31 05:00:00 | 2023-12-31 17:00:00 | 12 |  |  |  |  |  | 20:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 |  |  |  |  |  | 21:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 20:00:00 | 2024-01-01 08:00:00 | 12 | 2023-12-31 20:00:00 | 2024-01-01 08:00:00 | 12 |  |  |  |  |  | 22:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 |  |  |  |  |  | 23:00:00
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 20:00:00 | 2024-01-01 08:00:00 | 12 | 2023-12-31 20:00:00 | 2024-01-01 08:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 06:00:00 | 2023-12-31 18:00:00 | 12 | 2023-12-31 06:00:00 | 2023-12-31 18:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 16:00:00 | 8 | 2023-12-31 08:00:00 | 2023-12-31 16:00:00 | 8
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 10:00:00 | 2023-12-31 22:00:00 | 12 | 2023-12-31 10:00:00 | 2023-12-31 22:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12 | 2023-12-31 07:00:00 | 2023-12-31 19:00:00 | 12
 |  |  |  |  |  |  |  | 2023-12-31 00:00:00 |  |  |  | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12 | 2023-12-31 08:00:00 | 2023-12-31 20:00:00 | 12