Expected Delivery Date - Specific Delivery Week Days

Lucy520

New Member
Joined
Jun 11, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi,

We have a customer with several depots, and each has different fixed days of the week they accept deliveries from us. We tell the transport team what date they should plan the delivery for based on the order date (which is not always the date the order is processed) so we manually calculate this.

We aim to deliver the order on the 5th working day (counting the order date), or the next delivery day after that. Taking the example below, since the 5th working day falls on a non-delivery date for depot 101, we will deliver on the next delivery day we have for it (Wed).

Example:

Order Date: 11/06/24
1718143647053.png


The way we calculate it, the expected delivery dates for the above depots would be:
101: 19/06/24
102: 17/06/24

I thought I finally got it using WORKDAY.INTL by setting the non-delivery dates as weekend days, but then it only counts the delivery days as working days which is not what we want.

I want to be able to edit the order date value and calculate the expected delivery date for each depot based on the selected order date.

I've wasted too much time to figure this out on my own and using ChatGPT because it looks like a simple thing to do, but it's now time I ask for help so I would greatly appreciate any ideas.

Many thanks
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi & welcome to MrExcel.
How about
Excel Formula:
=WORKDAY.INTL(WORKDAY(A2,4),1,"1101111")
 
Upvote 0
Thank you for the suggestion, but I believe it's the same problem I mentioned where it only counts a day as a working day if it's also a delivery date, whereas I need it to count 5 working days(Mon-Fri) and if the 5th day falls on a non-delivery day, move forward until the closest delivery day. If the 5th day is a delivery day then that is the expected delivery date.

I changed the formula to the below to match the example for the 101 depot

Excel Formula:
=WORKDAY.INTL(WORKDAY(A2,4),1,"1100111")

The results are as follows:

Order dateExpected deliveryThe results I'm expecting
10/06/2024​
19/06/2024
19/06/2024
11/06/2024​
19/06/2024
19/06/2024
12/06/2024​
19/06/2024
19/06/2024
13/06/2024​
20/06/2024
19/06/2024
14/06/2024​
26/06/2024
20/06/2024
17/06/2024​
26/06/2024
26/06/2024
I'm not really sure how to explain this better, probably why I couldn't manage to find the solution online.

Appreciate the help!
 
Upvote 0
If you are counting the start date as one day, then use
Excel Formula:
=WORKDAY.INTL(WORKDAY(A2,3),1,"1100111")
 
Upvote 0
Solution
Thank you so much, I just worked that out and was coming here to let you know 😁
I'm glad to see the confirmation it's the right solution.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0
Another way to sort it out:
2024-06-11 Book1.xlsx
BCDEFGHIJKLMNOP
1Remarks:Weekend = Saturday, SundayHolidays (if necessary)DepotMondayTuesdayWednesdayThursdayFridaySaturdaySunday
2FirstDayOfWeek = Monday01.06.2024101TRUETRUE
315.06.2024102TRUETRUETRUE
4order date11.06.202420.06.2024103TRUE
5target delivery date17.06.202401.07.2024104TRUE
6delivery time5working days (incl. order date)16.07.2024
731.07.2024
8deliver to:15.08.2024
910119.06.2024Wednesday30.08.2024
1010217.06.2024Monday14.09.2024
1110320.06.2024Thursday
1210422.06.2024Saturday
13
Sheet2
Cell Formulas
RangeFormula
C5C5=WORKDAY.INTL(C4,C6-1,1,$G$2:$G$10)
C9:C12C9=LET(target_date, $C$5, depot_id, $B9, target_weekday, WEEKDAY(target_date,2), depot_days, XLOOKUP(depot_id,$I$2:I$10,J$2:P$10,,0), days_plus, LET( plus,SEQUENCE(1,7,0,1), checkDate, target_date+plus, checkWeekDay, WEEKDAY(checkDate,2), isDeliveryDay,INDEX(depot_days,1,checkWeekDay), output, IF(isDeliveryDay,checkDate,""), output), result, MIN(days_plus), result)
D9:D12D9=C9
G6:G10G6=G5+15
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J2:P10Cell Value=TRUEtextNO

this is a bit different, but I had to try it:
this takes into account the actual holidays at first, then it loops to check the available delivery dates, but at this point it doesn't check against the holidays again (this is on behalf of me getting lazy with age :) or it's the heat 🌞⛱️)
so you can see in the example date for depot 103 and 104 are wrong - first is on a holiday, second is on a weekend because it has true on Saturday, but weekends are excluded from the target date calculation.
 
Upvote 0

Forum statistics

Threads
1,223,872
Messages
6,175,104
Members
452,613
Latest member
amorehouse

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