Tabellab

A Dynamic Monthly Calendar: First Monday with WEEKDAY & a SEQUENCE Grid

Lesson 1 of 20Lab

All lessons
  1. A Dynamic Monthly Calendar: First Monday with WEEKDAY & a SEQUENCE GridLabFree
  2. Highlighting Weekends, Closed Days & the As-of Date with Formula RulesLab Locked
  3. Week Numbers & Working Days: ISOWEEKNUM, NETWORKDAYS & WORKDAY with a Closed-Day ListLab Locked
  4. A 4-on-4-off Shift Rota: Repeating Patterns with MOD & INDEXLab Locked
  5. Weekly Hours & Overtime from a Shift Rota: COUNTIF per Shift Code & MAX(0, …)Lab Locked
  6. A Daily Gantt with Progress: WORKDAY End Dates & Two Formula RulesLab Locked
  7. Milestones: Days Remaining, Overdue / Due Soon Status & the Next MilestoneLab Locked
  8. Yearly Planner Summary: Events per Month with COUNTIFS & a Stacked Column ChartLab Locked
  9. Event Labels in the Calendar Grid: All Events of a Day with TEXTJOIN & FILTER, Events per WeekLab Locked
  10. Team Leave Planner: Who Is Away Each Day, Minimum Cover & Leave Days Clipped to the MonthLab Locked
  11. Dock Door Bookings: Overlap Checks with COUNTIFS, Clashing Pairs & Booked Hours per DoorLab Locked
  12. On-Call Rota: Weekly Rotation from a Start Date, Swap Requests that Override & Weeks per PersonLab Locked
  13. A 2-2-3 Rota on a 14-Day Cycle: Day & Night Crews, Shifts per Crew, Weekend Shifts & Weekly HoursLab Locked
  14. Rota Rule Checks: Rest Hours between Shifts, Days in a Row & a Warning RuleLab Locked
  15. Coverage vs Demand by Hour: Staff on Duty from Shift Times, Staffing Gaps & a Combo ChartLab Locked
  16. Backward Scheduling from a Deadline: Latest Start Dates with Negative WORKDAY & Spare DaysLab Locked
  17. Gantt with Dependencies: Predecessors, Lag Days & the Knock-on Effect on the Project EndLab Locked
  18. Weekly Gantt & Crew Load: Working Days per Week, Crew-Days, Weeks over Capacity & Bars by RuleLab Locked
  19. Baseline vs Forecast: Slip in Working Days, Late Tasks, Average Slip & a Bar ChartLab Locked
  20. Final Project: 2026 Operations Calendar Dashboard with Cover %, Status Flags, KPIs & a Combo ChartLab Locked

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Read first

In Excel

  • Custom number format for the grid: Ctrl+1 > Number > Custom, type d.
  • Month title above the grid: =TEXT(B2,"mmmm yyyy").
  • Week starting on Sunday instead? Use =B2-WEEKDAY(B2)+1 and put Sun as the first header.
Loading the spreadsheet…

One date in, a whole month out: why a formula calendar beats a template

Every team that works on a schedule ends up with a calendar in Excel: a monthly overview for the notice board, a holiday planner, a delivery calendar for a warehouse, a booking sheet for a meeting room. Most people start by downloading a template and then spend the first day of every month retyping the numbers 1 to 31, shifting them one column to the left or right, and hoping they did not skip the 31st.

There is a better way. A dynamic monthly calendar needs exactly one input: any date. From that one cell Excel works out the 1st of the month, finds the Monday the grid has to start on, and fills six weeks of dates in the correct weekday columns. Type 15 May 2026 and you get May. Type a date in February 2027 and the whole grid redraws for February 2027, with the right weekdays and the right number of days, without a single manual change.

This free lesson is for office managers, team leads, planners, teachers and anybody else who prints or shares a calendar from Excel. It is the foundation of this course, which follows the hub team of Northgate, a fictional logistics hub, from a printable monthly calendar to a shift rota, a Gantt chart and a yearly planner. You only need basic Excel skills: if you can type a formula and copy it, you can build this calendar in about twenty minutes. The lab above checks every formula the moment you type it.

The core idea: a calendar is just 42 consecutive dates

The key insight is that a calendar page is not a collection of 28 to 31 separate numbers. It is a rectangle of consecutive dates: six rows of seven days, so 42 cells, starting on the Monday on or before the 1st of the month. Once you know that starting date, every other cell is simply the cell before it plus one day.

This works because Excel stores dates as whole numbers, so-called serial numbers. In the default 1900 date system, 1 January 1900 is 1, and every day adds 1. 15 May 2026 is stored as 46157, 1 May 2026 as 46143. What you see as a date is only a number format on top of that number. That is why you can add 1 to a date to get tomorrow, subtract two dates to get the days between them, and why a calendar grid can be generated with plain arithmetic.

Why six rows? A month has at most 31 days. In the worst case the 1st falls on a Sunday, so six days of the previous month sit in front of it in the first row. 6 + 31 = 37 cells, which needs six rows of seven (42 cells). Five rows are not always enough, and seven are never needed. The extra cells at the start and end show the last days of the previous month and the first days of the next one, which is exactly how printed wall calendars look.

Week rows each month of 2026 needs (Monday start)01234565Jan5Feb6Mar5Apr5May5Jun5Jul6Aug5Sep5Oct6Nov5DecPeach: six rows needed (Mar, Aug, Nov). Dashed line: grid capacity, 6 rows = 42 cells
In 2026, three months need all six rows; the rest fit into five. A fixed 6 × 7 grid handles every month. In February 2027, which starts on a Monday, only four rows hold days of the month itself.

So the whole calendar comes down to three questions, and each one is a single formula: Which month? (the 1st of the month from any date), Where does the grid start? (the Monday on or before that 1st), and What are the 42 dates? (a sequence counting up from that Monday).

Worked example: Northgate's May 2026 notice-board calendar

In the lab, the hub team types 15 May 2026 into B1. The task is to turn that one date into a complete calendar for May. Here is the finished sheet, cell by cell, with the exact formulas and the values Excel returns:

CellWhat it holdsFormulaResult (May 2026)
B1Any date in the monthtyped: 15 May 202615/05/2026 (serial 46157)
B21st of the month=DATE(YEAR(B1),MONTH(B1),1)Fri 1 May 2026 (46143)
B3Monday on or before the 1st=B2-WEEKDAY(B2,2)+1Mon 27 Apr 2026 (46139)
A6:G11The 42-day grid=SEQUENCE(6,7,B3) in A627 Apr … 7 Jun
G11Last cell of the grid(spilled) = B3+41Sun 7 Jun 2026 (46180)
D1Month title=TEXT(B2,"mmmm yyyy")May 2026
B13Days in the month=DAY(EOMONTH(B1,0))31

Step 1, the 1st of the month. =DATE(YEAR(B1),MONTH(B1),1) takes the year (2026) and the month (5) of B1 and builds a new date with day 1. Whatever day of the month you type in B1, the result is always the 1st. An equally good alternative is =EOMONTH(B1,-1)+1: EOMONTH with -1 returns the last day of the previous month (30 April), and adding one day gives 1 May. A common slip is =EOMONTH(B1,0), which returns the last day of the current month (31 May) instead.

Step 2, back to Monday. 1 May 2026 is a Friday. WEEKDAY(B2,2) numbers the days with Monday = 1 up to Sunday = 7, so for a Friday it returns 5. Subtracting 5 from the 1st takes you to the Sunday before (26 April), and adding 1 lands on Monday 27 April. In serial numbers: 46143 − 5 + 1 = 46139. If the 1st is itself a Monday, WEEKDAY returns 1 and the formula returns the 1st unchanged, which is exactly what you want.

B3 = B2 − WEEKDAY(B2,2) + 1 · Friday 1 May steps back 4 daysMon27 Apr1Tue28 Apr2Wed29 Apr3Thu30 Apr4Fri1 May5Sat2 May6Sun3 May7WEEKDAY(date,2)46143 − 5 + 1 = 46139 → Monday 27 April 2026Subtract the weekday number (5) to reach the Sunday before, add 1 to land on Monday.
WEEKDAY with return type 2 gives Friday the number 5. Going back 5 − 1 = 4 days from 1 May reaches Monday 27 April, the first cell of the grid.

Step 3, the grid. In Excel for Microsoft 365 or Excel 2021, a single formula in A6 fills all 42 cells: =SEQUENCE(6,7,B3). SEQUENCE returns an array of 6 rows and 7 columns that starts at the value in B3 and counts up by 1, filling row by row from left to right. That is precisely calendar order: Monday to Sunday in the first row, then the next week, and so on. The result spills into A6:G11, and the last cell, G11, holds B3 + 41 = Sunday 7 June 2026.

In older versions of Excel without dynamic arrays you need one formula per cell. The cleanest option is a single formula you can copy across the whole grid: =$B$3+(ROW()-ROW($A$6))*7+COLUMN()-COLUMN($A$6) in A6, copied to A6:G11. Each row adds 7 days, each column adds 1. The shorter version in the lab theory, =$B$3+(ROW()-6)*7+COLUMN()-1, gives the same result as long as the grid starts in A6; the ROW($A$6) version keeps working if you later insert rows above the calendar.

Step 4, the finishing touches. =TEXT(B2,"mmmm yyyy") in D1 writes the title "May 2026", and =DAY(EOMONTH(B1,0)) in B13 returns 31, the number of days in the month. EOMONTH(B1,0) is the last date of the month (31 May 2026); DAY pulls out its day number. Do not subtract dates for this: =EOMONTH(B1,0)-B2 returns 30, one day short, because both the 1st and the 31st count.

May 2026 · grid starts Mon 27 AprMonTueWedThuFriSatSun27 Apr2829301 May23456789101112131415161718192021222324252627282930311 Jun234567 JunB3 grid startB2 1st of monthB1 any dateG11 = B3+41
The finished grid for May 2026. Days of the month are bold; the greyed cells are the end of April and the start of June that complete the first and last week.

Now change B1 to, for example, 3 November 2026. B2 becomes Sunday 1 November, WEEKDAY(B2,2) returns 7, B3 jumps back six days to Monday 26 October, and the grid fills from 26 October to 6 December. November 2026 is one of the months that needs all six rows, and the grid already has them. You changed one cell; the calendar did the rest.

Which WEEKDAY return type do you need?

Most calendar mistakes come from the second argument of WEEKDAY. Without it, Excel uses return type 1, where Sunday is 1. With the formula =B2-WEEKDAY(B2)+1 you therefore land on a Sunday, which is right for a US-style calendar that starts on Sunday but wrong for a grid with Monday in the first column. Pick the return type that matches your header row:

return_typeNumberingUse it when
1 or omittedSunday = 1 … Saturday = 7Your calendar starts on Sunday (US style)
2Monday = 1 … Sunday = 7Your calendar starts on Monday (ISO, most of Europe)
3Monday = 0 … Sunday = 6You want the number of days to go back directly
11 to 17Monday = 1 up to Sunday = 1Excel 2010 and later: start the week on any day

With return type 3 the formula becomes =B2-WEEKDAY(B2,3) (no +1), because Monday already counts as 0. All three versions give the same Monday; use whichever you find easiest to read, and keep it consistent across the workbook.

How to build it in Excel, step by step

These steps work in Excel for Microsoft 365 and Excel 2021 on Windows and Mac. In Excel 2019 or older, use the copy-across formula from step 6 instead of SEQUENCE.

  1. Set up the input. Type Any date in A1 and a date in B1, for example 15/05/2026 (or press Ctrl+; to insert today). If you want the calendar to follow the current month automatically, use =TODAY() instead.
  2. Find the 1st. In B2 type =DATE(YEAR(B1),MONTH(B1),1) and press Enter. If you see a number like 46143, the cell has the General format: press Ctrl+1 and choose Number > Date.
  3. Find the grid start. In B3 type =B2-WEEKDAY(B2,2)+1. For May 2026 the result is Monday 27 April 2026.
  4. Write the weekday headers. Type Mon in A5, then drag the fill handle (the small square at the bottom right of the cell) to G5. Excel fills Tue to Sun by itself.
  5. Spill the grid. Select A6 and type =SEQUENCE(6,7,B3). The dates spill into A6:G11. If you get #SPILL!, something is already typed in that range: clear A6:G11 and try again.
  6. Older Excel only: in A6 type =$B$3+(ROW()-ROW($A$6))*7+COLUMN()-COLUMN($A$6) (press F4 to add the dollar signs), copy A6 and paste it into A6:G11.
  7. Show only the day number. Select A6:G11, press Ctrl+1, go to Number > Custom and type d in the Type box. The cells still hold full dates, which is what later formulas and formatting rules need.
  8. Add the title and the day count. In D1 type =TEXT(B2,"mmmm yyyy"), in B13 =DAY(EOMONTH(B1,0)).
  9. Grey out the other months (optional). Select A6:G11, go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format, enter =MONTH(A6)<>MONTH($B$2) and choose a light grey font. Lesson 2 of the course builds the full set of rules.
  10. Test it. Change B1 to dates in February, March and November and check that the first day sits under the right weekday. Press Ctrl+` to switch between formulas and values.
If you prefer empty cells instead of greyed-out days from the neighbouring months, wrap the grid in LET and IF: =LET(g,SEQUENCE(6,7,B3),IF(MONTH(g)=MONTH(B2),g,"")). Keep in mind that empty strings are text, so formulas that later count or compare the grid dates must ignore them.

Excel monthly calendar, shift rota and Gantt chart built with formulas for a logistics hub
One date drives the whole calendar: in this course the same idea grows into a shift rota, a Gantt chart and a yearly planner.

Common mistakes and how to spot them

A calendar formula rarely shows an error. It shows a believable calendar that is quietly wrong, which is worse. These are the mistakes that come up most often:

  • The grid starts on a Sunday. You used WEEKDAY(B2) without the 2. Spot it: the 1st appears one column to the right of where it should be, so check a month you know, such as a 1st that you know is a Monday.
  • The grid starts on the 1st. =SEQUENCE(6,7,B2) puts the 1st under Monday whatever weekday it really is. Spot it: hover over the 1st and compare its weekday with the column header, or add a check cell =TEXT(A6,"ddd") that must always say Mon.
  • Last day instead of first day. =EOMONTH(B1,0) returns the 31st, so the grid starts in the last week of the month. Spot it: the first row is mostly days of the current month and the 1st is missing.
  • Five rows instead of six. A 5 × 7 grid looks fine for most months and silently drops the last days of March, August and November 2026. Spot it: the last cell of the grid must always be at least the last day of the month, so test =G11>=EOMONTH(B1,0).
  • #SPILL! error. Something is in the way of the SEQUENCE result, often an old value or a space typed in one cell. Click the error icon and choose Select Obstructing Cells.
  • Text instead of a date in B1. A date typed in the wrong order for your regional settings, for example 05/15/2026 on a European system, is stored as text and every formula returns #VALUE!. Spot it: text is left-aligned by default, real dates are right-aligned.
  • Overwriting the grid by hand. Typing a public holiday note into a grid cell breaks the formula for that month only. Keep notes in a separate list and bring them into the calendar with formulas or conditional formatting.

Quick reference: functions and shortcuts used in this lesson

Function / shortcutSyntax or keysWhat it does here
DATE=DATE(year,month,day)Builds the 1st of the month from parts
YEAR / MONTH / DAY=MONTH(B1)Pulls one part out of a date
EOMONTH=EOMONTH(start,months)Last day of a month; EOMONTH(B1,-1)+1 is the 1st
WEEKDAY=WEEKDAY(date,2)Monday = 1 … Sunday = 7
SEQUENCE=SEQUENCE(rows,cols,start,[step])Spills the 6 × 7 grid (Excel 365 / 2021)
TEXT=TEXT(B2,"mmmm yyyy")Month title such as "May 2026"
TODAY=TODAY()Makes the calendar always show the current month
Format CellsCtrl+1 (Mac: Cmd+1)Custom format d shows only the day number
Today's date as a valueCtrl+;Types a fixed date into B1
Absolute referenceF4 (Mac: Cmd+T)Locks $B$3 in the non-365 grid formula
Show formulasCtrl+`Checks every cell of the grid at a glance

Real-world uses

The 42-date grid is a small building block, but it sits behind a surprising number of everyday workbooks:

  • Printable monthly calendars. One sheet, one input cell, twelve printouts a year. Set B1 to the 1st of each month, print, done. Add a print area and a header and the calendar is notice-board ready.
  • Team absence and holiday planners. Put the grid next to a list of absences and use COUNTIFS or conditional formatting to mark the days when someone is away. Because the grid holds real dates, the lookups just work.
  • Booking and room calendars. A meeting room, a vehicle or a piece of equipment: the grid shows the month, and a booking table feeds the occupied days into it.
  • Delivery and production schedules. A warehouse can colour the days with inbound deliveries, a bakery the days with large orders, a school the exam days, all from one list of dates.
  • Dashboards with a month selector. Link B1 to a drop-down of months and the calendar becomes part of a report that redraws for any period the reader picks.

What you will build in the rest of this course

Northgate stays with you through all 20 labs. Lesson 1 is free; lessons 2 to 20 are part of the full course for a one-time $9.90, and each of them builds on the grid you have just made. Every formula you type is checked instantly by the Coach, just like in the lab above.

Lesson 2: Highlighting Weekends, Closed Days & the As-of Date with Formula Rules. You colour the December calendar with conditional formatting: weekends with one WEEKDAY rule, the hub's closed days from a separate list with COUNTIF, and the as-of date with its own rule. You also count how many closed days actually fall in the month.

Lesson 3: Week Numbers & Working Days: ISOWEEKNUM, NETWORKDAYS & WORKDAY with a Closed-Day List. You build a month table for 2026 with the last day of every month, the working days without weekends and closed days, the ISO week each month starts in, and the payday that falls on the last working day.

Lesson 4: A 4-on-4-off Shift Rota: Repeating Patterns with MOD & INDEX. A 24/7 hub needs a rota. From one 8-day pattern you generate two weeks of shifts for four crews, check that every day and night is covered, and find the first night shift of a given crew.

Lesson 5: Weekly Hours & Overtime from a Shift Rota: COUNTIF per Shift Code & MAX(0, …). You turn a week of shift codes into hours per person, overtime above a weekly limit, the number of people over the limit, and the overtime cost.

Lesson 6: A Daily Gantt with Progress: WORKDAY End Dates & Two Formula Rules. A racking upgrade becomes a working-day Gantt chart: end dates that skip weekends with WORKDAY, a bar for every task drawn by conditional formatting, a darker section for the work already done, and the overall percentage complete.

Lesson 7: Milestones: Days Remaining, Overdue / Due Soon Status & the Next Milestone. You turn a milestone list into a status board with the days left, a status word for each milestone and the next milestone that is coming up, all updating from the as-of date.

Lesson 8: Yearly Planner Summary: Events per Month with COUNTIFS & a Stacked Column Chart. You summarise a full year of events by month and type, find the busiest month and the months without an audit, and chart the year as a stacked column chart.

Finish all 20 labs and the final exam to earn the course certificate, and you will have a set of calendar, rota and project-planning sheets that you can reuse in your own job.

Summary

A dynamic monthly calendar is 42 consecutive dates. =DATE(YEAR(B1),MONTH(B1),1) finds the 1st, =B2-WEEKDAY(B2,2)+1 steps back to the Monday on or before it, and =SEQUENCE(6,7,B3) fills six weeks in one go. The custom format d shows only the day numbers, TEXT writes the title and DAY(EOMONTH(B1,0)) counts the days. Change one date and the whole month redraws.

Now scroll up and build it yourself in the free lab: four tasks, about eighteen minutes, and the Coach tells you immediately whether each formula is right. Then try a few other dates in B1 and watch the grid move.

Frequently asked questions

How do I make a calendar in Excel that updates automatically?

Find the 1st of the month with =DATE(YEAR(B1),MONTH(B1),1), step back to the Monday with =B2-WEEKDAY(B2,2)+1 and fill a 6 × 7 grid with =SEQUENCE(6,7,B3). When you change the date in B1 the whole grid redraws.

How do I get the first day of the month in Excel?

Use =DATE(YEAR(A1),MONTH(A1),1) or =EOMONTH(A1,-1)+1. Both return the 1st of the month of the date in A1, whatever day of the month A1 holds.

Why does my Excel calendar start on Sunday instead of Monday?

WEEKDAY without a second argument counts Sunday as 1. Use WEEKDAY(date,2), where Monday is 1 and Sunday is 7, and the formula date-WEEKDAY(date,2)+1 returns a Monday.

Can I build a monthly calendar without SEQUENCE in older Excel?

Yes. Put =$B$3+(ROW()-ROW($A$6))*7+COLUMN()-COLUMN($A$6) in the first grid cell and copy it across all 42 cells. Each row adds 7 days and each column adds 1.

How do I show only the day number in a calendar cell?

Select the grid, press Ctrl+1, choose Number > Custom and type d as the format. The cells keep the full date, so formulas and conditional formatting still work.

How many days are in a month in Excel?

=DAY(EOMONTH(A1,0)) returns the number of days in the month of the date in A1, from 28 to 31. It also handles leap years automatically.

Keep going: Excel Calendars & Schedules: Dynamic Monthly Calendar, Shift Rota & Gantt with Formulas

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. Highlighting Weekends, Closed Days & the As-of Date with Formula Rules
  2. Week Numbers & Working Days: ISOWEEKNUM, NETWORKDAYS & WORKDAY with a Closed-Day List
  3. A 4-on-4-off Shift Rota: Repeating Patterns with MOD & INDEX
  4. Weekly Hours & Overtime from a Shift Rota: COUNTIF per Shift Code & MAX(0, …)
  5. A Daily Gantt with Progress: WORKDAY End Dates & Two Formula Rules
  6. Milestones: Days Remaining, Overdue / Due Soon Status & the Next Milestone
  7. Yearly Planner Summary: Events per Month with COUNTIFS & a Stacked Column Chart
  8. Event Labels in the Calendar Grid: All Events of a Day with TEXTJOIN & FILTER, Events per Week
  9. Team Leave Planner: Who Is Away Each Day, Minimum Cover & Leave Days Clipped to the Month
  10. Dock Door Bookings: Overlap Checks with COUNTIFS, Clashing Pairs & Booked Hours per Door
  11. On-Call Rota: Weekly Rotation from a Start Date, Swap Requests that Override & Weeks per Person
  12. A 2-2-3 Rota on a 14-Day Cycle: Day & Night Crews, Shifts per Crew, Weekend Shifts & Weekly Hours
  13. Rota Rule Checks: Rest Hours between Shifts, Days in a Row & a Warning Rule
  14. Coverage vs Demand by Hour: Staff on Duty from Shift Times, Staffing Gaps & a Combo Chart
  15. Backward Scheduling from a Deadline: Latest Start Dates with Negative WORKDAY & Spare Days
  16. Gantt with Dependencies: Predecessors, Lag Days & the Knock-on Effect on the Project End
  17. Weekly Gantt & Crew Load: Working Days per Week, Crew-Days, Weeks over Capacity & Bars by Rule
  18. Baseline vs Forecast: Slip in Working Days, Late Tasks, Average Slip & a Bar Chart
  19. Final Project: 2026 Operations Calendar Dashboard with Cover %, Status Flags, KPIs & a Combo Chart

Buy course — $9.90 See the full course