Adding Hours & Minutes to Dates & Times w/in Working Hours

reberryjr

Well-known Member
Joined
Mar 16, 2017
Messages
714
Office Version
  1. 365
Platform
  1. Windows
I recently posted a question on how to identify the time taken to process a task. The answer to the question was to use this formula:

Excel Formula:
=(NETWORKDAYS(BD2,BF2,Variables!$A$2:$A$34)-1)*(Variables!$E$2-Variables!$C$2)+IF(NETWORKDAYS(BF2,BF2,Variables!$A$2:$A$34),MEDIAN(MOD(BF2,1),Variables!$E$2,Variables!$C$2),Variables!$E$2)-MEDIAN(NETWORKDAYS(BD2,BD2,Variables!$A$2:$A$34)*MOD(BD2,1),Variables!$E$2,Variables!$C$2)

I'd like to be able to add X minutes to the Task Start Date & Time so that I can identify the Estimated Completed Date & Time. I would need the result to return a date & time that falls within Network Days AND working hours. In the underlying example, the SLA for the task is 30 minutes. Since working hours are 08:00 - 16:00 and 7/4/24 was a holiday, the due date would be pushed to 7/5/24 & 8:15.
1723566962780.png


Worksheet structure:
1723567185459.png
 
When I modify the formula from post 6 to match your layout, I get this:

2024-08-13_2.xlsx
BDBNBOBP
1Task StartDateSLA MinutesResultExpected
203-Jul-24 15:450:3005-Jul-24 08:1505-Jul-24 08:15
330-Jul-24 14:084:0031-Jul-24 10:08?
Data
Cell Formulas
RangeFormula
BO2:BO3BO2=WORKDAY(BD2,CEILING((BN2+MOD(BD2,1)-Variables!$C$2)/(Variables!$D$2-Variables!$C$2),1)-1,Holidays)+MOD(BD2,1)+BN2-CEILING(MOD(BD2,1)+BN2-Variables!$C$2,Variables!$D$2-Variables!$C$2)+Variables!$D$2-Variables!$C$2


2024-08-13_2.xlsx
ABCD
1HolidaysStart TimeEnd Time
24-Jul-2408:0016:00
Variables


(note: I have July 4 as the only date in the holiday list as I don't know what you need)
I said I was tired right? My formula was correct. One of the reference cells wasn't. Thank you for your help!!!!
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,225,730
Messages
6,186,698
Members
453,369
Latest member
positivemind

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