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.
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Watch MrExcel Video

Forum statistics

Threads
1,122,747
Messages
5,597,905
Members
414,189
Latest member
Duque_

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
Top