Help with Time/Date calculation to add hours excluding evening and weekends

mike435

New Member
Joined
Mar 13, 2025
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
Hello,
On a previous thread, the formula below calculates the time difference between two times and dates excluding evenings and weekends:
=SUMPRODUCT(INT((WEEKDAY(B2-{2,3,4,5,6})+INT(H2)-INT(B2))/7),{"16:10","16:10","16:10","16:10","15:40"}-"8:00")+MOD(H2,1)-MOD(B2,1)-IF(WEEKDAY(H2)=6,"15:40","16:10")+"8:00"

Is it possible to have a similar formula that adds 10 hours onto a date and time taking into account working hours. For example you start a job at 14:00 but stop at 17:00 as the factory closes and restarts again at 06:00. The job would then finish at 13:00.

Thanks Mike
 

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