Hi, I’m looking for a formula that provides a more granular version of Excel’s WORKDAY function. It needs to add a decimal number of working hours to a date and time value, accounting for an 08:00 to 17:00 workday (Monday to Friday), with a lunch break from 13:00 to 14:00 each day (those times need to be configurable), and a list of holidays to produce a due date and time.
So, given these working hours (Monday to Friday) and list of Holidays (J2:J3):
The formula needs to replicate the manually calculated values in the Due Date & Time column (C).
Any help is greatly appreciated.
So, given these working hours (Monday to Friday) and list of Holidays (J2:J3):
WorkHours_Calculations.xlsx | ||||||
---|---|---|---|---|---|---|
G | H | I | J | |||
1 | Working Times (Mon to Fri) | Holidays | ||||
2 | WorkDay_Start | 08:00 | 06 March 2024 | |||
3 | LunchBreak_Start | 13:00 | 01 May 2024 | |||
4 | LunchBreak_End | 14:00 | ||||
5 | WorkDay_End | 17:00 | ||||
6 | Work_Hrs_per_Day | 8 | ||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H6 | H6 | =((LunchBreak_Start-WorkDay_Start)+(WorkDay_End-LunchBreak_End))*24 |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
LunchBreak_End | =Sheet1!$H$4 | H6 |
LunchBreak_Start | =Sheet1!$H$3 | H6 |
WorkDay_End | =Sheet1!$H$5 | H6 |
WorkDay_Start | =Sheet1!$H$2 | H6 |
The formula needs to replicate the manually calculated values in the Due Date & Time column (C).
WorkHours_Calculations.xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Start Date & Time | # Hours | Due Date & Time | ||
2 | Mon, 04 Mar 2024 08:00 | 1.25 | Mon, 04 Mar 2024 09:15 | ||
3 | Mon, 04 Mar 2024 11:00 | 3.00 | Mon, 04 Mar 2024 15:00 | ||
4 | Mon, 04 Mar 2024 15:03 | 4.00 | Tue, 05 Mar 2024 10:03 | ||
5 | Mon, 04 Mar 2024 10:00 | 12.00 | Tue, 05 Mar 2024 15:00 | ||
6 | Mon, 04 Mar 2024 16:00 | 8.00 | Tue, 05 Mar 2024 16:00 | ||
7 | Tue, 05 Mar 2024 07:30 | 2.50 | Tue, 05 Mar 2024 10:30 | ||
8 | Tue, 05 Mar 2024 13:30 | 2.50 | Tue, 05 Mar 2024 16:30 | ||
9 | Tue, 05 Mar 2024 15:00 | 4.00 | Thu, 07 Mar 2024 10:00 | ||
10 | Tue, 05 Mar 2024 18:00 | 8.00 | Thu, 07 Mar 2024 17:00 | ||
11 | Fri, 08 Mar 2024 12:00 | 32.00 | Thu, 14 Mar 2024 12:00 | ||
Sheet1 |
Any help is greatly appreciated.