Creative display of the word 'Weekend' in wooden letters on a textured pink background. Several working weeks and holiday layers in one Excel workbook
Photo by Ann H on Pexels

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.

This is an editorial pen name used by the publication, not a claim of an independently verified personal identity. Original editorial credit: Planning Desk.

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.

CalendarWeekend stringBasis
US-FED0000011Saturday and Sunday, the default weekend
AE-SHJ0000111Sharjah 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.

LayerPublisherScopeFromToAs of
US_FEDOPMUS federal holiday schedule2027-01-012027-12-312026-10-25
CA_STATECalHRCalifornia state employees2027-01-012027-12-312026-10-25
AB_GENGovernment of AlbertaAlberta general holidays2027-01-012027-12-312026-10-25

Closures: one row per layer and date. These are the rows the tests below use.

LayerDateNote
US_FED2027-02-15Washington's Birthday
AB_GEN2027-02-15Alberta Family Day
AB_GEN2027-03-26Good Friday
CA_STATE2027-03-31March 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.

IdWeekendL1L2L3
US-FED0000011US_FED--
US-CA0000011US_FEDCA_STATE-
CA-AB0000011AB_GEN--
CA-US0000011US_FEDAB_GEN-
AE-SHJ0000111---

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:

  • SameLayer must be FALSE. A repeated layer is a setup error.
  • Overlap can 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.
  • InScope is 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.
  • Numeric catches 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.

#CalendarCallExpected
T1US-FEDWORKDAY.INTL from Fri 2027-02-12, +5Mon 2027-02-22 (15 Feb closed)
T2CA-ABfrom Mon 2027-03-22, +5Tue 2027-03-30 (Good Friday closed, Easter Monday open)
T3US-CAfrom Mon 2027-03-29, +5Tue 2027-04-06 (US-FED alone gives Mon 2027-04-05)
T4AE-SHJfrom Thu 2027-03-25, +5Mon 2027-04-05 (a Saturday-Sunday week gives Thu 2027-04-01)
T5US-FED, US-CA, CA-AB, AE-SHJNETWORKDAYS.INTL 2027-03-01 to 2027-03-3123, 22, 22, 19
T6US-CAfrom Tue 2027-04-06, -5Mon 2027-03-29 (the T3 round trip closes)
T7US-FEDfrom Sat 2027-02-13, 0Sat 2027-02-13 (zero returns the start)
T8CA-USfrom Fri 2027-02-12, +5Mon 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

More in Guides

Latest from Evelyn C. Reed