Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
=SUMPRODUCT((WEEKDAY(DATE(YEAR(A2),MONTH(A2),ROW(INDIRECT("1:"&DAY(EOMONTH(A2,0))))),2)=B2)*1)Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Need it for your exact data?
Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.
Yes — enter 7 in column B (WEEKDAY mode 2 maps Sunday to 7).
Yes, EOMONTH automatically returns the correct last day, including February 29 in leap years.
Build a frequency distribution in Excel or Google Sheets using FREQUENCY — count how many values fall in each bin with one array formula, no COUNTIF loop required.
How-toCount overlapping date ranges in Excel or Google Sheets with SUMPRODUCT — detect how many date intervals share at least one day with a reference range, no VBA required.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: