Hi, i have a similar question and mentioned below
Start date in F2 Column 5/13/2024 3:36:32 AM
End date in G2 Column 5/15/2024 10:38:40 AM
from start & end date time calculate the working hours from start shift day is 8pm in AX3 column to End shift day is 7am AY3 Column by excluding the weekend and holiday range AU2:AU12 need a excel formula. Thanks
Start date in F2 Column 5/13/2024 3:36:32 AM
End date in G2 Column 5/15/2024 10:38:40 AM
from start & end date time calculate the working hours from start shift day is 8pm in AX3 column to End shift day is 7am AY3 Column by excluding the weekend and holiday range AU2:AU12 need a excel formula. Thanks
Net work hours.xlsx | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F | G | W | AT | AU | AV | AW | AX | AY | ||||||||||||||||||||||||||||||||||||||||
1 | Start Date | End Date | Output in Hours | Holiday Date | Shift Start Time | Shift End Time | ||||||||||||||||||||||||||||||||||||||||||
2 | 05/06/2024 19:00 | 05/07/2024 19:00 | 2 | 05/01/2024 | 20:00:00 | 7:00:00 | ||||||||||||||||||||||||||||||||||||||||||
3 | ||||||||||||||||||||||||||||||||||||||||||||||||
4 | ||||||||||||||||||||||||||||||||||||||||||||||||
Net Work Hours |
Cell Formulas | ||
---|---|---|
Range | Formula | |
W2 | W2 | =NETWORKDAYS.INTL(F2,G2,1,Holidays)-(NETWORKDAYS.INTL(F2,F2,1,Holidays)*IF(MOD(F2,1)>ET,1,(MAX(ST,MOD(F2,1))-ST)/(ET-ST))-(NETWORKDAYS.INTL(G2,G2,1,Holidays)*IF(MOD(G2,1)<ST,1,(ET-MIN(ET,MOD(G2,1)))/(ET-ST))))*(ET-ST)*24 |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
ET | ='Net Work Hours'!$AY$2 | W2 |
Holidays | ='Net Work Hours'!$AU$2:$AU$12 | W2 |
ST | ='Net Work Hours'!$AX$2 | W2 |