" If these dates were public holidays then the real start/end date is a day later/earlier and in any case I'm struggling to work it out otherwise".
Mike's formula is great, but having issue when start date is a public holiday, does anyone know how to resolve this?
Thank you.
Hi,
Try this =(NETWORKDAYS(A1,A2)-1)*(B2-B1)+IF(NETWORKDAYS(A2,A2),MEDIAN(MOD(A2,1),B2,B1),B2)-MEDIAN(NETWORKDAYS(A1,A1)*MOD(A1,1),B2,B1)
Where:-
A1= Earlier date/time
A2= Later date/time
B1 = 08:00
B2 = 17:00
Mike
"CHRISTI" wrote:
I need to calculate the total WORK-hours (08:00-17:00) between two date/time-stamps;
-excluding WEEKENDS
-excluding PUBLIC HOLIDAYS
eg#1.: A1=START DATE/TIME & A2=END DATE/TIME & A3=RESULT ([hh]:mm)
A1 11-01-2008 09:00:00
A2 11-01-2008 11:00:00
A3 02:00
eg#2.: A1=START DATE/TIME & A2=END DATE/TIME & A3=RESULT ([hh]:mm)
A1 11-01-2008 09:00:00
A2 14-01-2008 11:00:00
A3 11:00
eg#3.: A1=START DATE/TIME & A2=END DATE/TIME & A3=RESULT ([hh]:mm)
A1 14-01-2008 09:00:00
A2 16-01-2008 11:00:00
A3 20:00
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 09:03:20 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,326,324 |