Spreadsheet: 714243d1611150909-night-hours-formula-works-only-for-some-shifts-night-shift
Sheet: Sheet1

 |  |  | Нight Hours
 |  |  | 22:00:00
 |  |  | 06:00:00
Shift Code | Start of Shift | End of Shift | Working Hours | Night Hours |  | Shift Code | Start of Shift | End of Shift | Working Hours | Night Hours |  | Shift Code | Start of Shift | End of Shift | Working Hours | Night Hours
T0 | 00:00:00 | 08:30:00 | 8 |  |  | R0 | 00:00:00 | 04:30:00 | 4 |  |  | S0 | 00:00:00 | 06:45:00 | 6
T1 |  |  | 8 |  |  | R1 |  |  | 4 |  |  | S1 |  |  | 6
T2 |  |  | 8 |  |  | R2 |  |  | 4 |  |  | S2 |  |  | 6
T3 |  |  | 8 |  |  | R3 |  |  | 4 |  |  | S3 |  |  | 6
T4 |  |  | 8 |  |  | R4 |  |  | 4 |  |  | [NAME] |  |  | 6
T5 |  |  | 8 |  |  | R5 |  |  | 4 |  |  | S5 |  |  | 6
T6 |  |  | 8 |  |  | R6 |  |  | 4 |  |  | S6 |  |  | 6
T7 |  |  | 8 |  |  | R7 |  |  | 4 |  |  | S7 |  |  | 6
T8 |  |  | 8 |  |  | R8 |  |  | 4 |  |  | S8 |  |  | 6
T9 |  |  | 8 |  |  | R9 |  |  | 4 |  |  | S9 |  |  | 6
T10 |  |  | 8 |  |  | R10 |  |  | 4 |  |  | S10 |  |  | 6
T11 |  |  | 8 |  |  | R11 |  |  | 4 |  |  | S11 |  |  | 6
T12 |  |  | 8 |  |  | R12 |  |  | 4 |  |  | S12 |  |  | 6
T13 |  |  | 8 |  |  | R13 |  |  | 4 |  |  | S13 |  |  | 6
T14 |  |  | 8 |  |  | R14 |  |  | 4 |  |  | S14 |  |  | 6
T15 |  |  | 8 |  |  | R15 |  |  | 4 |  |  | S15 |  |  | 6
T16 |  |  | 8 |  |  | R16 |  |  | 4 |  |  | S16 |  |  | 6
T17 |  |  | 8 |  |  | R17 |  |  | 4 |  |  | S17 |  |  | 6
T18 |  |  | 8 |  |  | R18 |  |  | 4 |  |  | S18 |  |  | 6
T19 |  |  | 8 |  |  | R19 |  |  | 4 |  |  | S19 |  |  | 6
T20 |  |  | 8 |  |  | R20 |  |  | 4 |  |  | S20 |  |  | 6
T21 |  |  | 8 |  |  | R21 |  |  | 4 |  |  | S21 |  |  | 6
T22 |  |  | 8 |  |  | R22 |  |  | 4 |  |  | S22 |  |  | 6
T23 |  |  | 8 |  |  | R23 |  |  | 4 |  |  | S23 |  |  | 6
T24 |  |  | 8 |  |  | R24 |  |  | 4 |  |  | S24 |  |  | 6
T25 |  |  | 8 |  |  | R25 |  |  | 4 |  |  | S25 |  |  | 6
T26 |  |  | 8 |  |  | R26 |  |  | 4 |  |  | S26 |  |  | 6
T27 |  |  | 8 |  |  | R27 |  |  | 4 |  |  | [NAME] |  |  | 6
T28 |  |  | 8 |  |  | R28 |  |  | 4 |  |  | S28 |  |  | 6
T29 |  |  | 8 |  |  | R29 |  |  | 4 |  |  | S29 |  |  | 6
T30 |  |  | 8 |  |  | R30 |  |  | 4 |  |  | S30 |  |  | 6
T31 |  |  | 8 |  |  | R31 |  |  | 4 |  |  | S31 |  |  | 6
T32 |  |  | 8 |  |  | R32 |  |  | 4 |  |  | S32 |  |  | 6
T33 |  |  | 8 |  |  | R33 |  |  | 4 |  |  | S33 |  |  | 6
T34 |  |  | 8 |  |  | R34 |  |  | 4 |  |  | S34 |  |  | 6
T35 |  |  | 8 |  |  | R35 |  |  | 4 |  |  | S35 |  |  | 6
T36 |  |  | 8 |  |  | R36 |  |  | 4 |  |  | S36 |  |  | 6
T37 |  |  | 8 |  |  | R37 |  |  | 4 |  |  | S37 |  |  | 6
T38 |  |  | 8 |  |  | R38 |  |  | 4 |  |  | S38 |  |  | 6
T39 |  |  | 8 |  |  | R39 |  |  | 4 |  |  | S39 |  |  | 6
T40 |  |  | 8 |  |  | R40 |  |  | 4 |  |  | S40 |  |  | 6
T41 |  |  | 8 |  |  | R41 |  |  | 4 |  |  | S41 |  |  | 6
T42 |  |  | 8 |  |  | R42 |  |  | 4 |  |  | S42 |  |  | 6
T43 |  |  | 8 |  |  | R43 |  |  | 4 |  |  | S43 |  |  | 6
T44 |  |  | 8 |  |  | R44 |  |  | 4 |  |  | S44 |  |  | 6
T45 |  |  | 8 |  |  | R45 |  |  | 4 |  |  | S45 |  |  | 6
T46 |  |  | 8 |  |  | R46 |  |  | 4 |  |  | S46 |  |  | 6
T47 |  |  | 8 |  |  | R47 |  |  | 4 |  |  | S47 |  |  | 6
 |  |  |  |  |  | R48 |  |  | 4
 |  |  |  |  |  | R49 |  |  | 4
 |  |  |  |  |  | R50 |  |  | 4
 |  |  |  |  |  | R51 |  |  | 4
 |  |  |  |  |  | R52 |  |  | 4
 |  |  |  |  |  | R53 |  |  | 4
 |  |  |  |  |  | R54 |  |  | 4
 |  |  |  |  |  | R55 |  |  | 4
 |  |  |  |  |  | R56 |  |  | 4
 |  |  |  |  |  | R57 |  |  | 4
 |  |  |  |  |  | R58 |  |  | 4
 |  |  |  |  |  | R59 |  |  | 4
 |  |  |  |  |  | R60 |  |  | 4
 |  |  |  |  |  | R61 |  |  | 4
 |  |  |  |  |  | R62 |  |  | 4
 |  |  |  |  |  | R63 |  |  | 4
 |  |  |  |  |  | [NAME] |  |  | 4
 |  |  |  |  |  | R65 |  |  | 4
 |  |  |  |  |  | R66 |  |  | 4
 |  |  |  |  |  | R67 |  |  | 4
 |  |  |  |  |  | R68 |  |  | 4
 |  |  |  |  |  | R69 |  |  | 4
 |  |  |  |  |  | R70 |  |  | 4
 |  |  |  |  |  | R71 |  |  | 4
 |  |  |  |  |  | R72 |  |  | 4
 |  |  |  |  |  | R73 |  |  | 4
 |  |  |  |  |  | R74 |  |  | 4
 |  |  |  |  |  | R75 |  |  | 4
 |  |  |  |  |  | R76 |  |  | 4
 |  |  |  |  |  | R77 |  |  | 4
 |  |  |  |  |  | R78 |  |  | 4
 |  |  |  |  |  | [NAME] |  |  | 4
 |  |  |  |  |  | R80 |  |  | 4
 |  |  |  |  |  | R81 |  |  | 4
 |  |  |  |  |  | R82 |  |  | 4
 |  |  |  |  |  | R83 |  |  | 4
 |  |  |  |  |  | R84 |  |  | 4
 |  |  |  |  |  | R85 |  |  | 4
 |  |  |  |  |  | R86 |  |  | 4
 |  |  |  |  |  | R87 |  |  | 4
 |  |  |  |  |  | R88 |  |  | 4
 |  |  |  |  |  | R89 |  |  | 4
 |  |  |  |  |  | R90 |  |  | 4
 |  |  |  |  |  | R91 |  |  | 4
 |  |  |  |  |  | R92 |  |  | 4
 |  |  |  |  |  | R93 |  |  | 4