
Guides
Part of Country calendars: three origins of a closed day
Several working weeks and holiday layers in one Excel workbook
Run WORKDAY.INTL and NETWORKDAYS.INTL across different weekends and stacked closure lists in one workbook, with a 2027 federal, state, provincial and UAE example and expected answers.
What to take away
- WORKDAY.INTL and NETWORKDAYS.INTL take a weekend as a seven-character string of 0 and 1, starting with Monday, where 1 marks a non-workday. Store the string with each calendar and the formula never changes.
- Keep every closure in one long table with a layer name, and keep each layer's publisher, scope and as-of date in a second table.
- Build the holidays argument per row as the union of that row's layers:
UNIQUE(FILTER(...)). A date named by two layers is passed once. - Add three checksthe layer list is not repeated, the layer is allowed for that calendar, and the layer covers the dates in the window.
- Keep a test block with hand-worked answers. The block below has eight, using real 2027 dates.
Excel does not supply closure dates. Microsoft's documentation describes the holidays argument as an optional range or array of dates you provide. This guide assumes Excel for Microsoft 365, 2021 or 2024, where FILTER, UNIQUE and LET are available.
Weekend strings
WORKDAY.INTL has the signature WORKDAY.INTL(start_date, days, [weekend], [holidays]). A string of the wrong length or with other characters returns #VALUE!. The string 1111111 is not valid. A positive count moves forward, a negative count moves back, and zero returns the start date. NETWORKDAYS.INTL takes the same weekend and holidays arguments. Microsoft's own January 2006 example, 31 days minus 9 weekend days, gives 22, which shows that both end dates are counted.
| Calendar | Weekend string | Basis |
|---|---|---|
| US-FED | 0000011 | Saturday and Sunday, the default weekend |
| AE-SHJ | 0000111 | Sharjah government works Monday to Thursday and rests Friday to Sunday, per the UAE government portal |
The UAE federal government keeps Saturday and Sunday, so it would share 0000011. Saudi Labor Law art. 104 names Friday as the weekly rest day, so 0000100 is the minimum. The article names no second rest day, so confirm which days the employer or sector observes before you load one.
Three tables
Layers: one row per published list, so the question "where did this date come from" has an answer.
| Layer | Publisher | Scope | From | To | As of |
|---|---|---|---|---|---|
| US_FED | OPM | US federal holiday schedule | 2027-01-01 | 2027-12-31 | 2026-10-25 |
| CA_STATE | CalHR | California state employees | 2027-01-01 | 2027-12-31 | 2026-10-25 |
| AB_GEN | Government of Alberta | Alberta general holidays | 2027-01-01 | 2027-12-31 | 2026-10-25 |
Closures: one row per layer and date. These are the rows the tests below use.
| Layer | Date | Note |
|---|---|---|
| US_FED | 2027-02-15 | Washington's Birthday |
| AB_GEN | 2027-02-15 | Alberta Family Day |
| AB_GEN | 2027-03-26 | Good Friday |
| CA_STATE | 2027-03-31 | March 31 on the CalHR list, a Wednesday in 2027 |
Load the full list for each layer, not only these rows. OPM's 2027 schedule has eleven dates, with Juneteenth observed on Friday 18 June and Independence Day on Monday 5 July. Alberta treats Easter Monday as optional, so it is not in AB_GEN unless the employer observes it. CalHR says holidays for represented employees are in the applicable Memorandum of Understanding, so coverage differs by employee group and the scope column matters.
Calendars: one row per working week and layer set.
| Id | Weekend | L1 | L2 | L3 |
|---|---|---|---|---|
| US-FED | 0000011 | US_FED | - | - |
| US-CA | 0000011 | US_FED | CA_STATE | - |
| CA-AB | 0000011 | AB_GEN | - | - |
| CA-US | 0000011 | US_FED | AB_GEN | - |
| AE-SHJ | 0000111 | - | - | - |
CA-US is a cross-border calendar for a deadline that both parties must be able to act on. AE-SHJ has no closures loaded, because this guide did not verify a Sharjah list. A real workbook needs one before it is used.
The formulas
A jobs table has Start, Days and Cal. Look up the weekend and the three layers with INDEX and MATCH, for example in Weekend:
=INDEX(Calendars[Weekend], MATCH([@Cal], Calendars[Id], 0))
Do the same for L1, L2 and L3. Then the result:
=LET(
inc, ((Closures[Layer]=[@L1]) + (Closures[Layer]=[@L2]) + (Closures[Layer]=[@L3])) > 0,
cl, UNIQUE(FILTER(Closures[Date], inc, 1)),
WORKDAY.INTL([@Start], [@Days], [@Weekend], cl))
FILTER returns #CALC! when nothing matches unless the third argument is given. The 1 is the fallback. Editorial suggestion: use a date serial far outside every window, so a calendar with no layers needs no special case. The counting version is the same with NETWORKDAYS.INTL([@From], [@To], [@Weekend], cl). NETWORKDAYS.INTL counts both end dates and WORKDAY.INTL does not count its start date, so a round trip between them is off by one. The monthly working-days guide works through it.
Checks that catch a layer applied twice or out of scope
Add these as columns next to the result.
SameLayer: =OR(AND([@L1]<>"-",[@L1]=[@L2]), AND([@L1]<>"-",[@L1]=[@L3]), AND([@L2]<>"-",[@L2]=[@L3]))
Overlap: =LET(
inc, ((Closures[Layer]=[@L1]) + (Closures[Layer]=[@L2]) + (Closures[Layer]=[@L3])) > 0,
d, FILTER(Closures[Date], inc, 1),
ROWS(d) - ROWS(UNIQUE(d)))
InScope: =AND(
OR([@L1]="-", COUNTIFS(Permit[Cal],[@Cal],Permit[Layer],[@L1])>0),
OR([@L2]="-", COUNTIFS(Permit[Cal],[@Cal],Permit[Layer],[@L2])>0),
OR([@L3]="-", COUNTIFS(Permit[Cal],[@Cal],Permit[Layer],[@L3])>0))
Covered: =OR([@L1]="-", AND(
MIN([@Start],[@Result]) >= INDEX(Layers[From], MATCH([@L1], Layers[Layer], 0)),
MAX([@Start],[@Result]) <= INDEX(Layers[To], MATCH([@L1], Layers[Layer], 0))))
Numeric: =COUNT(Closures[Date]) = ROWS(Closures[Date])
Permit is a two-column table of the layers each calendar may use. Covered is shown for the first slot, so repeat it for L2 and L3. It needs From and To columns in the Layers table, holding 2027-01-01 and 2027-12-31 for the three layers above. A few notes:
SameLayermust be FALSE. A repeated layer is a setup error.Overlapcan be above zero for a good reason. CA-US has AB_GEN and US_FED both naming 15 February 2027, so its overlap is 1. The union still counts the day once. An overlap you did not expect means two layers copied each other.InScopeis the only check that catches a valid list used for the wrong body. A layer from Alberta used in a California row gives a confident wrong date.Numericcatches closure dates stored as text. Fix the column rather than trusting the result. For serial numbers and imported dates, see dates between spreadsheets and interfaces.
Test block with expected answers
Hand-worked from the weekend strings and the closures above. Keep it at the bottom of the workbook with a pass flag beside each row. Run it after every change to a table. The answers come from working the rules by hand, not from running the workbook.
| # | Calendar | Call | Expected |
|---|---|---|---|
| T1 | US-FED | WORKDAY.INTL from Fri 2027-02-12, +5 | Mon 2027-02-22 (15 Feb closed) |
| T2 | CA-AB | from Mon 2027-03-22, +5 | Tue 2027-03-30 (Good Friday closed, Easter Monday open) |
| T3 | US-CA | from Mon 2027-03-29, +5 | Tue 2027-04-06 (US-FED alone gives Mon 2027-04-05) |
| T4 | AE-SHJ | from Thu 2027-03-25, +5 | Mon 2027-04-05 (a Saturday-Sunday week gives Thu 2027-04-01) |
| T5 | US-FED, US-CA, CA-AB, AE-SHJ | NETWORKDAYS.INTL 2027-03-01 to 2027-03-31 | 23, 22, 22, 19 |
| T6 | US-CA | from Tue 2027-04-06, -5 | Mon 2027-03-29 (the T3 round trip closes) |
| T7 | US-FED | from Sat 2027-02-13, 0 | Sat 2027-02-13 (zero returns the start) |
| T8 | CA-US | from Fri 2027-02-12, +5 | Mon 2027-02-22, Overlap = 1 |
If T4 returns 1 April, the weekend string was not picked up. If T2 returns 29 March, the layer was not loaded. If T5 returns 23 for US-CA, the state layer is missing.
What to load for each calendar
Which lists belong in a calendar is a legal question, not a spreadsheet one. For a US federal court period, Rule 6(a) counts every day and rolls a last day on a Saturday, Sunday or legal holiday, and adds state-declared holidays for periods measured after an event. The formulas above count working days. They do not implement that rule. Pick the lists from the body that sets the deadline. How country calendars work and state and regional calendars cover who publishes what.
Sources
- [MicrosoftWORKDAY.INTL function](https://support.microsoft.com/en-us/office/workday-intl-function-a378391c-9ba7-4678-8a39-39611a9bf81d)
- [MicrosoftNETWORKDAYS.INTL function](https://support.microsoft.com/en-us/office/networkdays-intl-function-a9b26239-4f20-46a1-9ab8-4e925bfd5e28)
- [MicrosoftFILTER function](https://support.microsoft.com/en-us/office/filter-function-f4f7cb66-82eb-4767-8f7c-4877ad80c759)
- [MicrosoftUNIQUE function](https://support.microsoft.com/en-us/office/unique-function-c5ab87fd-30a3-4ce9-9d1a-40204fb85e1e)
- [MicrosoftLET function](https://support.microsoft.com/en-us/office/let-function-34842dd8-b92b-4d3f-b325-b8b8f9908999)
- [OPMfederal holidays 2026 and 2027](https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/)
- [CalHRCalifornia state holidays](https://www.calhr.ca.gov/about-calhr/divisions-programs/personnel-management/leave-benefits/#holidays)
- [Government of Albertageneral holidays](https://www.alberta.ca/alberta-general-holidays)
- UAE government portalworking hours in the public sector
- Saudi Ministry of Human Resources and Social DevelopmentLabor Law
- Federal Rules of Civil Procedure, Rule 6







