WORKDAY.INTL does not block out holidays

shawnbull

New Member
Joined
Nov 27, 2007
Messages
35
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I am using the following:-=WORKDAY.INTL(Z5,0,1,'date calcs'!$F$5:$F$19) to set up a list of date that correspond to dates from
Mon to Fri, but should exclude public holidays.
The Z column captures all the dates in sequence that follows Mon to Friday based on the weekday formula.
My understanding is that public holidays should not show if the date falls on a public holiday, yet 25 Dec and 26 Dec both
public holidays in RSA show up.
The "date calcs'!$F$5:$F$19 is the worksheet reference to the public holidays.

Can anyone assist as regards what the error may be

or provide a solution where the month and year is derived from the tab name eg DEC 2024
and incorporated into a date(B1,A1,C1) function where B1 is the derived year, A1 is the derived month and C1 is the 1st weekday of the month.
The rows run in sequence from the 1st weekday date of the month to the last weekday date of the month, but should exclude
the public holidays
So Dec 2024 should look something like this:-
02/12/2024 (falls on a Monday)
03/12/2024
04/12/2024
05/12/2024
06/12/2024 (Falls on a Friday)
09/12/2024 (skips weekend to next Monday)
etc to week of Christmas that should look like this
23/12/2024 (the Monday)
24/12/2024
27/12/2024 (skips the public holidays)
30/12/2024 (skips the weekend)
31/12/2024
 
Did you use a named range for the Holidays list?
Did you check what range the named list refers to?
If you still wish to use the sheet name for the relevant month, I show in the post below the formulas without the Lambda.

Dates andTime 2024.xlsm
MNO
101-Dec-23Workdays
2Fri 01-Dec-23
3Mon 04-Dec-23
4Tue 05-Dec-23
5Wed 06-Dec-23
6Thu 07-Dec-23
7Fri 08-Dec-23
8Mon 11-Dec-23
9Tue 12-Dec-23
10Wed 13-Dec-23
11Thu 14-Dec-23
12Fri 15-Dec-23
13Mon 18-Dec-23
14Tue 19-Dec-23
15Wed 20-Dec-23
16Thu 21-Dec-23
17Fri 22-Dec-23
18Wed 27-Dec-23
19Thu 28-Dec-23
20Fri 29-Dec-23
Dec 2023
Cell Formulas
RangeFormula
M1M1=LET(t, TEXTAFTER(CELL("filename",$A$1),"]"),d,TEXTSPLIT(t," "),DATE(INDEX(d,2),MONTH(INDEX(d,1)&("-1")),1))
O2:O20O2=WORKDAY.INTL(M1-1,SEQUENCE(NETWORKDAYS(M1,EOMONTH(M1,0),Holidays)),,Holidays)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
Holidays='Dec 2023'!$F$2:$F$4O2
 
Upvote 0
Solution

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Did you use a named range for the Holidays list?
Did you check what range the named list refers to?
If you still wish to use the sheet name for the relevant month, I show in the post below the formulas without the Lambda.

Dates andTime 2024.xlsm
MNO
101-Dec-23Workdays
2Fri 01-Dec-23
3Mon 04-Dec-23
4Tue 05-Dec-23
5Wed 06-Dec-23
6Thu 07-Dec-23
7Fri 08-Dec-23
8Mon 11-Dec-23
9Tue 12-Dec-23
10Wed 13-Dec-23
11Thu 14-Dec-23
12Fri 15-Dec-23
13Mon 18-Dec-23
14Tue 19-Dec-23
15Wed 20-Dec-23
16Thu 21-Dec-23
17Fri 22-Dec-23
18Wed 27-Dec-23
19Thu 28-Dec-23
20Fri 29-Dec-23
Dec 2023
Cell Formulas
RangeFormula
M1M1=LET(t, TEXTAFTER(CELL("filename",$A$1),"]"),d,TEXTSPLIT(t," "),DATE(INDEX(d,2),MONTH(INDEX(d,1)&("-1")),1))
O2:O20O2=WORKDAY.INTL(M1-1,SEQUENCE(NETWORKDAYS(M1,EOMONTH(M1,0),Holidays)),,Holidays)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
Holidays='Dec 2023'!$F$2:$F$4O2
Thanks. Do use a named range
 
Upvote 0
Thanks. Do use a named range
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
Thank you for the input and apologies for the marked solution. I had marked a solution originally, but assumed after I got further responses that it might not have taken, so did it again.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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