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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

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