Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
Heads up: Excel and Google Sheets do this differently.
=IFERROR(SMALL(IF(WEEKDAY(DATE(A2,B2,SEQUENCE(31)),2)=1,DATE(A2,B2,SEQUENCE(31))),SEQUENCE(6)),"")=FILTER(DATE(A2,B2,SEQUENCE(31)),WEEKDAY(DATE(A2,B2,SEQUENCE(31)),2)=1,DATE(A2,B2,SEQUENCE(31))<=EOMONTH(DATE(A2,B2,1),0))Computed by a real spreadsheet engine on the sample data below.
| Year | Month |
| 2025 | 6 |
=IFERROR(SMALL(IF(WEEKDAY(DATE(A2,B2,SEQUENCE(31)),2)=1,DATE(A2,B2,SEQUENCE(31))),SEQUENCE(6)),"")→
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Need the Google Sheets version instead? Open Sheets variant in workspace →
Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.
SEQUENCE(31) generates day numbers up to 31 regardless of how many days are in the month. Days beyond the month end overflow into the next month. The EOMONTH guard (DATE(...)<=EOMONTH(...)) removes them.
Yes — generate all 365 days with SEQUENCE(365) starting from January 1, then filter by WEEKDAY=1. Combine with a start date instead of separate year/month inputs.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: