# Urgent - Calculate time between two dates but include working hours of Saturday

#### sn0365

##### New Member
Hello,

Can someone please help me with a formula which can help me calculate the total time in hours between two dates but exclude

the total hours starting from Saturday (13:00 hours) to end of Sunday (23:59:59).

regards,
sn0365

### Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
 Now Last Sat @ 1PM (B2) Last Sun EOD (C2) 2/8/2019 15:11 2/2/2019 13:00 2/3/19 11:59 PM Actual Start Actual End Calc Start Calc End 2/1/2019 08:00 2/2/2019 14:00 2/1/2019 08:00 2/2/2019 13:00 2/3/2019 16:00 2/4/2019 08:00 2/3/2019 23:59 2/4/2019 08:00 2/1/2019 9:00 2/1/2019 17:00 2/1/2019 09:00 2/1/2019 17:00 2/4/2019 9:00 2/4/2019 17:00 2/4/2019 09:00 2/4/2019 17:00

<tbody>
</tbody>
Calculations
B2
Code:
``=FLOOR(NOW() -MOD(WEEKDAY(NOW(),1),7),1) +0.542``
C2
Code:
``=FLOOR(NOW() -(MOD(WEEKDAY(NOW(),1),7) -2),1) -0.0001``
C4
Code:
``=IF(A4 < FLOOR(NOW() -MOD(WEEKDAY(NOW(),1),7),1) +0.542,A4,IF(A4 < FLOOR(NOW() -(MOD(WEEKDAY(NOW(),1),7) -2),1) -0.0001,FLOOR(NOW() -(MOD(WEEKDAY(NOW(),1),7) -2),1) -0.0001,A4))``
D4
Code:
``=IF(B4 >FLOOR(NOW() -(MOD(WEEKDAY(NOW(),1),7) -2),1) -0.0001,B4,IF(B4>FLOOR(NOW() -MOD(WEEKDAY(NOW(),1),7),1) +0.542,FLOOR(NOW() -MOD(WEEKDAY(NOW(),1),7),1) +0.542,B4))``
C4 & D4 were copied down
To get the difference use D4 - C4 which will give the result in daytime which can be formatted in hours

Last edited:

Replies
8
Views
188
Replies
1
Views
374
Replies
3
Views
446
Replies
4
Views
59
Replies
31
Views
1K

1,218,519
Messages
6,142,937
Members
450,456
Latest member
Exidur

### 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.

### Which adblocker are you using?

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

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