time calculation on working hours less weekend

Heber

New Member
Joined
Oct 13, 2009
Messages
30
Hi I am Struggling to solve this!

I need to calculate time between two dates, but need to be only between 8:00 AM and 5:00 PM, excluding weekends.
I got some results, but when the start time is over 5:00 pm still add the time...
example below:

Start End Transmission time (h:mm)
28/09/2019 18:41 30/09/2019 9:29 ?

supposed to be only 1:29 min...

kind regards
Heber
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi,

try this:


Book1
ABC
128-9-2019 18:41:0030-9-2019 09:29:001:29:00
Sheet1
Cell Formulas
RangeFormula
C1=(NETWORKDAYS(A1,B1)-1)*("17:00"-"08:00")+IF(NETWORKDAYS(B1,B1),MEDIAN(MOD(B1,1),"17:00","08:00"),"17:00")-MEDIAN(NETWORKDAYS(A1,A1)*MOD(A1,1),"17:00","08:00")
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,572
Members
448,972
Latest member
Shantanu2024

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