esset
New Member
- Joined
- Oct 18, 2023
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
I am trying to allocate hours worked to multiple shift patterns. I thought I found a solution in a different thread however it is not 100% right.
In some cases the formulas don't work.
Any help would be appreciated.
In some cases the formulas don't work.
Any help would be appreciated.
Cell Formulas | ||
---|---|---|
Range | Formula | |
D9 | D9 | =IF($B$2="","",TEXT(B1,"uu:mm")&"-"&TEXT(B2,"uu:mm")) |
E9 | E9 | =IF($B$3="","",TEXT(B2,"uu:mm")&"-"&TEXT(B3,"uu:mm")) |
F9 | F9 | =IF($B$4="","",TEXT(B3,"uu:mm")&"-"&TEXT(B4,"uu:mm")) |
G9 | G9 | =IF($B$5="","",TEXT(B4,"uu:mm")&"-"&TEXT(B5,"uu:mm")) |
H9 | H9 | =IF($B$6="","",TEXT(B5,"uu:mm")&"-"&TEXT(B6,"uu:mm")) |
I9 | I9 | =IF($B$7="","",TEXT(B6,"uu:mm")&"-"&TEXT(B7,"uu:mm")) |
D10 | D10 | =C2 |
E10 | E10 | =C3 |
F10 | F10 | =C4 |
G10 | G10 | =C5 |
H10 | H10 | =C6 |
I10 | I10 | =C7 |
D13:D25 | D13 | =IF($B$2="","",IF(COUNT($B13:$C13)=2,MAX(0,MIN($B$2,$C13+($C13<$B13))-MAX($B13,$B$1))+MAX(0,MIN($B$2+1,$C13+($C13<$B13))-1),"")) |
E13:E25 | E13 | =IF($B$3="","",IF(COUNT($B13:$C13)=2,MAX(0,MIN($B$3,$C13+($C13<$B13))-MAX($B13,$B$2)),"")) |
F13:F25 | F13 | =IF($B$4="","",IF(COUNT($B13:$C13)=2,MAX(0,MIN($B$4,$C13+($C13<$B13))-MAX($B13,$B$3)),"")) |
G13:G25 | G13 | =IF($B$5="","",IF(COUNT($B13:$C13)=2,MAX(0,MIN($B$5,$C13+($C13<$B13))-MAX($B13,$B$4)),"")) |
H13:H25 | H13 | =IF($B$6="","",IF(COUNT($B13:$C13)=2,MAX(0,MIN($B$6,$C13+($C13<$B13))-MAX($B13,$B$5)),"")) |
I13:I25 | I13 | =IF($B$7="","",IF(COUNT($B13:$C13)=2,MAX(0,MIN($B$7,$C13+($C13<$B13))-MAX($B13,$B$6)),"")) |
J13:J25 | J13 | =IF(COUNT($B13:$C13)=2,$C13-$B13+($C13<$B13),"") |
K13:K25 | K13 | =SUM(D13:I13) |
L13:L25 | L13 | =J13-K13 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
L13:L25 | Cell Value | >0 | text | NO |