Subtract lunch break hours from Workday.Intl formula?

YourExcellency

New Member
Joined
Dec 6, 2022
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
I need to calculate estimated completion date for various projects. However, I need to subtract lunch breaks, and Sundays so that the formula works correctly. The work continues 24 hours (from 00:00 to 24:00) with three lunch breaks (each 1 hour). Lunch breaks are 03:30 - 04:30; 11:30 - 12:30; 19:00 - 20:00. I am using the formula below; Workday.Intl(C4-1;1+INT(F4/H4/21);11)+MOD(C4;1)+(F4-INT(F4/H4/21)*21*H4)/H4/21;""). However, it always shows an approximate time. I need the date to show me the exact time and minute of the Estimated Finishing time. Any help is much appreciated.
EFT.png
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
B4= Product A, C4=Start time (5.12.2022 10:00), G4=planned speed/hour (30.000)
I2=03:30, J2=11:30, K2=19:00, L2=24:00 (formatted for [h]:mm)
Formula in H4
Excel Formula:
=WORKDAY.INTL(INT(C4),INT((G4+24*MOD(C4,1))/21),1)+MOD(G4+24*MOD(C4,1),21)/24+AGGREGATE(15,6,{0,1,2,3}/(MOD(G4+24*MOD(C4,1),21)/24<=$I$2:$L$2),1)/24-AGGREGATE(15,6,{0,1,2,3}/(MOD(C4,1)<=$I$2:$L$2),1)/24
ABCDEFGHIJKL
03:3011:3019:0024:00
04:3012:3020:0024:00
05-12-2022 10:303006-12-2022 21:30
 
Upvote 0
Solution

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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