January 1, 2027 is a Friday. WEEKDAY of that date, with the default return type, is 6. Sunday is 1 on that scale and Saturday is 7. One formula can spill a Sunday-through-Saturday month from that fact. The formula needs SEQUENCE, which is in Microsoft 365, Excel 2021, Excel 2024, and Excel for the web.
The printable file for these dates is the 2027 calendar with US federal holidays. Maya Ellis filled it in on 12/02/2026. The year is 2027 and the weeks start on Sunday. The file puts each day in its own cell. That is the Excel 2010 fill shown later on this page. June 19 is still a Saturday, so the observed day is June 18. July 4 is still a Sunday, so the observed day is July 5. December 25 is still a Saturday, so the observed day is December 24. Monday through Friday, skipping those observed days, is 250 workdays. She also typed six personal dates. January 18 is a hike, on the King holiday. December 24 is Christmas Eve dinner.
January starts on the Sunday before the Friday
Row 1 is the weekday names, Sunday through Saturday. The formula goes in A2, the Sunday cell under that header. The Sunday on or before January 1 is December 27, 2026. SEQUENCE then writes 6 rows and 7 columns, stepping by 1.
=LET(
first, DATE(2027,1,1),
start, first - WEEKDAY(first, 1) + 1,
days, SEQUENCE(6, 7, start, 1),
IF(MONTH(days) = MONTH(first), days, "")
)
WEEKDAY of January 1 is 6, so start is January 1 minus 6 plus 1, which is December 27. SEQUENCE(6, 7, start, 1) is that Sunday through Saturday, February 6. The IF keeps a date only when its month is January. December 27 through December 31 clear. February 1 through February 6 clear. A2 holds the formula and displays a blank.
=LET(first,DATE(2027,1,1),start,first-WEEKDAY(first,1)+1,days,SEQUENCE(6,7,start,1),IF(MONTH(days)=MONTH(first),days,""))| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
| 2 | 1/1/2027 | 1/2/2027 | |||||
| 3 | 1/3/2027 | 1/4/2027 | 1/5/2027 | 1/6/2027 | 1/7/2027 | 1/8/2027 | 1/9/2027 |
| 4 | 1/10/2027 | 1/11/2027 | 1/12/2027 | 1/13/2027 | 1/14/2027 | 1/15/2027 | 1/16/2027 |
| 5 | 1/17/2027 | 1/18/2027 | 1/19/2027 | 1/20/2027 | 1/21/2027 | 1/22/2027 | 1/23/2027 |
| 6 | 1/24/2027 | 1/25/2027 | 1/26/2027 | 1/27/2027 | 1/28/2027 | 1/29/2027 | 1/30/2027 |
| 7 | 1/31/2027 |
Format the spill as a date, MM/DD/YYYY or D. January 18 is Monday, the third Monday of January. That is Birthday of Martin Luther King, Jr. It sits in B5.
#SPILL! means the cells under the formula, or to its right, are not empty. Clear the 6-by-7 block and enter the formula again. Excel 2019 returns #NAME? for SEQUENCE and for LET. On that version, put the Sunday in Z1:
=DATE(2027,1,1)-WEEKDAY(DATE(2027,1,1),1)+1
Z1 is December 27, 2026. In A2, enter the formula below and fill it across seven columns and down six rows. ROW()-2 is 0 on row 2, and COLUMN()-1 is 0 in column A, so A2 tests December 27 and F2 tests January 1.
=IF(MONTH($Z$1+(ROW()-2)*7+COLUMN()-1)=1, $Z$1+(ROW()-2)*7+COLUMN()-1, "")
Twelve month-starts from the first of January
xl.sequence.months spills the first of each month. From January 1, 2027, twelve months are January 1 through December 1. The name needs Microsoft 365, Excel 2024, or Excel for the web. The picture uses EDATE and SEQUENCE, which is the calculation inside the name:
=EDATE(DATE(2027,1,1),SEQUENCE(12)-1)| A | |
|---|---|
| 1 | 1/1/2027 |
| 2 | 2/1/2027 |
| 3 | 3/1/2027 |
| 4 | 4/1/2027 |
| 5 | 5/1/2027 |
| 6 | 6/1/2027 |
| 7 | 7/1/2027 |
| 8 | 8/1/2027 |
| 9 | 9/1/2027 |
| 10 | 10/1/2027 |
| 11 | 11/1/2027 |
| 12 | 12/1/2027 |
=xl.sequence.months(DATE(2027,1,1), 12)
For February, point first at February 1 in that spill instead of DATE(2027,1,1). February 1, 2027 is a Monday, so February’s Sunday cell is January 31, and the month test clears it. March 1 is also a Monday. 2027 is not a leap year, so February has 28 days and February 28 is a Sunday.
| Month start | Weekday |
|---|---|
| 01/01/2027 | Friday |
| 02/01/2027 | Monday |
| 03/01/2027 | Monday |
| 04/01/2027 | Thursday |
| 05/01/2027 | Saturday |
| 06/01/2027 | Tuesday |
| 07/01/2027 | Thursday |
| 08/01/2027 | Sunday |
| 09/01/2027 | Wednesday |
| 10/01/2027 | Friday |
| 11/01/2027 | Monday |
| 12/01/2027 | Wednesday |
WEEKDAY of each first, with Sunday as 1, is 6, 2, 2, 5, 7, 3, 5, 1, 4, 6, 2, and 4.
Federal holidays, and the three days OPM moves
OPM’s 2027 holiday schedule lists the day most Monday-through-Friday federal employees are off. The legal dates come from section 6103(a) of title 5 of the United States Code. xl.us.holiday returns the legal date. It does not move a Saturday back to Friday or a Sunday forward to Monday.
| Holiday | Legal date | Weekday | OPM day off |
|---|---|---|---|
| New Year’s Day | 01/01/2027 | Friday | 01/01/2027 |
| Birthday of Martin Luther King, Jr. | 01/18/2027 | Monday | 01/18/2027 |
| Washington’s Birthday | 02/15/2027 | Monday | 02/15/2027 |
| Memorial Day | 05/31/2027 | Monday | 05/31/2027 |
| Juneteenth National Independence Day | 06/19/2027 | Saturday | 06/18/2027 |
| Independence Day | 07/04/2027 | Sunday | 07/05/2027 |
| Labor Day | 09/06/2027 | Monday | 09/06/2027 |
| Columbus Day | 10/11/2027 | Monday | 10/11/2027 |
| Veterans Day | 11/11/2027 | Thursday | 11/11/2027 |
| Thanksgiving Day | 11/25/2027 | Thursday | 11/25/2027 |
| Christmas Day | 12/25/2027 | Saturday | 12/24/2027 |
Washington’s Birthday is the name in the statute. OPM’s page says the same thing. The LAMBDA key for that Monday is Presidents.
Thanksgiving 2027 is Thursday, November 25. November 1, 2027 is a Monday, so the first Thursday is November 4, and the fourth Thursday is 21 days later. That is the same count as How to find Thanksgiving in Excel, with the year set to 2027.
=xl.us.holiday(2027, "Thanksgiving")
=xl.us.holiday(2027, "Juneteenth")
Those return November 25 and June 19. June 19 is a Saturday. OPM lists Friday, June 18, under 5 U.S.C. 6103(b): a holiday that falls on Saturday is observed the Friday before, for most federal employees. July 4, 2027 is a Sunday, and OPM lists Monday, July 5. OPM cites section 3(a) of Executive Order 11582 for a Sunday holiday moving to the following Monday. Christmas, December 25, is a Saturday, so OPM lists Friday, December 24.
=IF(WEEKDAY(B2)=7,B2-1,IF(WEEKDAY(B2)=1,B2+1,B2))| A | B | |
|---|---|---|
| 1 | Value | |
| 2 | Legal date | 6/19/2027 |
| 3 | Weekday | 7 |
| 4 | Day off | 6/18/2027 |
The day-off formula uses the default WEEKDAY scale. Saturday is 7, so the date moves back one day. Sunday is 1, so the date moves forward one day. Any other weekday stays put. July 4, 2027 through that formula is July 5. December 25, 2027 is December 24. January 1, 2027 is a Friday and stays January 1.
Put the legal dates in a column named Holidays if the calendar should mark the statute’s day. Put the OPM column there instead if the mark should be the Monday-through-Friday day off. A cell on the grid is a holiday when COUNTIF of that list is greater than 0:
=COUNTIF(Holidays, F2)>0
January 1, in F2, is a holiday on both lists. June 19 is a holiday only on the legal list. June 18 is a holiday only on the OPM list.