Tricky Maths formula > Calculate Due time

JumboCactuar

Well-known Member
Joined
Nov 16, 2016
Messages
785
Office Version
  1. 365
Platform
  1. Windows
Hi,
The hour range is between store open times (Monday - Friday 09:00 till 17:00)

If an order is placed we have a time of 6 hours to ship out the order.

Example:
An order is recieved Monday at 09:53, it has to be completed by 16:00
09:53 rounds up to 10:00 + 6 hours


Though if an order is placed at 15:30 it has to be fulfilled by 14:00 the next day
15:30 rounds to 16:00
16:00 - 17:00 = 1hour
next day 09:00 - 14:00 = 5 hours


As there is no work on a weekend, orders recieved friday after 11pm have to be fulfiled monday.

Order DateOrder TimeFulfil DateFulfil Time
Thursday 14th Dec10:41Thursday 14th Dec17:00
Thursday 14th Dec13:01Friday 15th Dec12:00
Friday 15th Dec14:29Monday 18th Dec13:00

<tbody>
</tbody>

The red is what i need to calculate from the order date/time, i dont know how to go about this

Appreciate any help
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Fulfil Date: Holidays is a named range of holiday dates

=WORKDAY(A2+B2+6/24+7/24-1,1,Holidays)


Fulfil Time

=CEILING(B2+IF(B2>=11/24,-2/24,6/24),1/24)
 
Upvote 0
Fulfil Date: Holidays is a named range of holiday dates

=WORKDAY(A2+B2+6/24+7/24-1,1,Holidays)


Fulfil Time

=CEILING(B2+IF(B2>=11/24,-2/24,6/24),1/24)

this is great thankyou :)

only thing, it doesnt account for orders placed after closing time - e.g 19:45

the 6 hours for these times start 09:00 the following day
 
Upvote 0
This formula will work for your question:
StartDurationFinishDay StartDay Finish
do 14dec17 10:41:00do 14dec17 11:00:0006:00:00do 14dec17 17:00:0009:0017:00
do 14dec17 13:01:00do 14dec17 14:00:0006:00:00vr 15dec17 12:00:00
vr 15dec17 14:29:00vr 15dec17 15:00:0006:00:00ma 18dec17 13:00:00
za 16dec17 14:10:00za 16dec17 15:00:0006:00:00ma 18dec17 15:00:00

<tbody>
</tbody>
1. In A2 put your Order date & Time
2. In B2 you put this formula:
Code:
=INT($A2*24+0.999999)/24-0.000000001
3. In C2 put your duration (06:00:00)
4. In G2 Start time of workday and in H2 End time of workday
5. In D2 put formula
Code:
=WORKDAY(WORKDAY(WORKDAY($B2,-1),1),CEILING(($C2+MAX(MIN(1*(WEEKDAY($B2,2)<6)*MOD($B2,1),$H$2),$G$2)-$G$2)/($H$2-$G$2),1)-1)+
MAX(MIN(1*(WEEKDAY($B2,2)<6)*MOD($B2,1),$H$2),$G$2)+$C2-CEILING(MAX(MIN(1*(WEEKDAY($B2,2)<6)
*MOD($B2,1),$H$2),$G$2)+$C2-$G$2,$H$2-$G$2)+$H$2-$G$2
 
Upvote 0

Forum statistics

Threads
1,215,223
Messages
6,123,714
Members
449,118
Latest member
MichealRed

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