Networkdays help - calculating business hours only

Li_zzza

New Member
Joined
Oct 3, 2017
Messages
13
Hi all,

Firstly, thank you for your help.

I have a data set of entry and response time. The entry and response time can start/end over the weekend. I'm looking for a formula that can calculate the working hours between the two dates. If the entry date is during working hours and response time is over the weekend, then the hour should stop counting at 5 pm the previous Friday. If the entry date is over weekend and response time is over the weekend, then it should be 0. If the entry date is over the weekend and response is during working hours, it should count only the working hours.

Currently, I have =NETWORKDAYS(H2,I2,Sheet1!$B$2:$B$9)-1-MOD(H2,1)+MOD(I2,1) but it seems to be miscounting Fridays and ALL of the hours on the working day (00:00 - 23:59) instead of from 9 am to 5 pm.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,956
Latest member
JPav

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