The formula
Weekly dates (6 weeks)ExcelGoogle Sheets
=SEQUENCE(6,1,A2,7)In C2, spills: [Jan 5, 2026], [Jan 12, 2026], [Jan 19, 2026], [Jan 26, 2026], [Feb 2, 2026], [Feb 9, 2026]
Month-end dates (4 months)Excel
=EOMONTH(A2,SEQUENCE(4,1,0))In E2, spills: [Jan 31, 2026], [Feb 28, 2026], [Mar 31, 2026], [Apr 30, 2026]
Google Sheets month-endsGoogle Sheets
=ARRAYFORMULA(EOMONTH(A2,SEQUENCE(4,1,0)))In G2, spills: [Jan 31, 2026], [Feb 28, 2026], [Mar 31, 2026], [Apr 30, 2026]
✓ Tested. All 2 Excel results in this example were recalculated in LibreOffice Calc 25.2 and matched the values shown. 1 result for formulas tagged Google Sheets was checked with a reference implementation of the documented behavior, because LibreOffice can't run that function.
Worked example
Paste the data below into a blank sheet starting at cell A1 (or download the cheat sheet, where every example is set up). Highlighted cells hold the formulas and show the expected results.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Start date | ||||||
| 2 | Jan 5, 2026 | Jan 5, 2026 | Jan 31, 2026 | Jan 31, 2026 | |||
| 3 | Jan 12, 2026 | Feb 28, 2026 | Feb 28, 2026 | ||||
| 4 | Jan 19, 2026 | Mar 31, 2026 | Mar 31, 2026 | ||||
| 5 | Jan 26, 2026 | Apr 30, 2026 | Apr 30, 2026 | ||||
| 6 | Feb 2, 2026 | ||||||
| 7 | Feb 9, 2026 |
How it works
- 6
- Rows to generate.
- 1
- Columns (1 = a vertical list).
- A2
- The first date.
- 7
- Step in days: 1 = daily, 7 = weekly.
- EOMONTH(A2,SEQUENCE(4,1,0))
- Month offsets 0,1,2,3 turn into the last day of each month.
Common errors and fixes
Numbers like 46027 instead of dates?
The spill area is formatted as General. Format it as a date.
Why does the formula return #SPILL!?
Clear the cells under the formula.
Does this work in Google Sheets?
Yes. Use the formulas tagged "Google Sheets" on this page; formulas tagged only "Excel" use Excel-specific syntax.