Calculating business hours between two dates

Jayden831

New Member
Joined
Aug 7, 2015
Messages
5
I need to calculate response times in business hours either same day or between 2 days. Business hours are M-F 8-8 and Sat 930a-1230p. I don't care about holidays and response time hours could be greater than 24 hours. I need to deliver h:mm result only counting business hours.

a1 start date
b1 start time
c1 end date
d1 end time

i was able to get it somewhat working using network days formula but obviously didn't account for Saturday and/or didn't work for any result greater than 24 hours. The h:mm result can be a whole number or decimal as long as it calculates total hours.

Please help. I have spent hours trying different combinations from the boards and can't seem to get this right.

Desperate. Thanks
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I have not arrived at a solution, but I did a lot of experimentation, and perhaps my learnings could get you close to the answer.

Take a look:

Excel Workbook
ABCDEFGHIJKL
1Weekday From08:00
2Weekday To20:00
3Saturday From09:30
4Saturday To12:30
5
6Start DateStart TimeEnd DateEnd TimeDay After StartDay Before EndHours In-BetweenStart Date HoursEnd Date HoursTotal Hours
78/3/201510:008/7/201515:008/4/20158/6/20151.502:00:007:00:0045:00:00
Sheet1
 
Upvote 0
imagepng
 
Last edited:
Upvote 0
Thanks Iliace. I am going to play with your approach now as it is very different. If you have a minute can you take a look at my formula? I need to add in Saturday hours 930-1230 and then also know how to deliver results higher than 24 hours. Any help would be greatly appreciated. Thanks!the

imagepng
 
Last edited:
Upvote 0
I think there might be a problem with the images, they aren't loading for me.
 
Upvote 0
Try this. Thanks

Date TimeSent Date Time Response
Sent Sent Received Received Bus Hrs Notes

08/01/15 0:37 AM 08/01/15 2:10 PM 0:00 Should be 4:05 (a Saturday)
08/03/15 10:22 AM 08/07/15 2:22 PM 4:00 Should be 46 (roughly) * Over 24 hours
08/03/15 12:58 PM 08/04/15 1:12 PM 12:14 ok
08/03/15 3:12 PM 08/05/15 1:38 PM 22:26 ok
08/03/15 5:08 PM 08/03/15 7:32 PM 2:24 ok
08/03/15 6:17 PM 08/03/15 8:12 PM 1:43 ok
08/03/15 10:06 PM 08/04/15 1:11 PM 5:11 ok
08/04/15 10:02 AM 08/06/15 6:37 PM 8:35 Should be 32.5 (roughly) * Over 24 hours

=(NETWORKDAYS(A2+B2,F2+G2)-1)*("20:00"-"8:00")+IF(NETWORKDAYS(F2+G2,F2+G2),MEDIAN(MOD(F2+G2,1),"8:00","20:00"),"20:00")-MEDIAN(NETWORKDAYS(A2+B2,A2+B2)*MOD(A2+B2,1),"8:00","20:00")



<colgroup><col><col><col span="2"><col><col><col span="6"></colgroup><tbody>
</tbody>
 
Upvote 0
I believe this task is complex. Take a look at this link, which might be helpful: http://www.exceltactics.com/calculate-net-work-hours-using-networkdays/
<strike></strike>
 
Upvote 0

Forum statistics

Threads
1,215,854
Messages
6,127,345
Members
449,379
Latest member
phyxius117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top