FormulaCraft

How to group data by month using formulas instead of a pivot in Excel and Google Sheets

Topic:Pivot-style summaries (formula approach)
Excel & Google Sheets
=SUMIFS(B2:B7,A2:A7,">="&DATE(2024,1,1),A2:A7,"<="&EOMONTH(DATE(2024,1,1),0))

Verified example

Computed by a real spreadsheet engine on the sample data below.

DateAmount
2024-01-05500
2024-01-20300
2024-02-10700
2024-02-25200
2024-03-15900
2024-03-28100

=SUMIFS(B2:B7,A2:A7,">="&DATE(2024,1,1),A2:A7,"<="&EOMONTH(DATE(2024,1,1),0))0

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Place dates in A2:A7 and amounts in B2:B7 in your flat data table.
  2. 2In a summary table, list the first day of each month in column D (e.g., D2 = DATE(2024,1,1), D3 = DATE(2024,2,1)).
  3. 3In E2 write =SUMIFS(B$2:B$7,A$2:A$7,">="&D2,A$2:A$7,"<="&EOMONTH(D2,0)).
  4. 4EOMONTH(D2,0) returns the last day of the month in D2 — this bounds the upper date without hardcoding day counts.
  5. 5Copy E2 down for each month row; the formula adjusts D2 reference automatically.

Tips

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.

Frequently asked

How is this different from grouping in a pivot table?

A pivot's date grouping requires a manual Refresh when data changes and the month list is generated automatically. The SUMIFS approach updates instantly and lets you control exactly which months appear.

Can I group by year and month at the same time?

Yes — add YEAR() and MONTH() helper columns, then SUMIFS on both: =SUMIFS(B2:B7,YEAR(A2:A7),2024,MONTH(A2:A7),3).

What if dates are stored as text?

Use DATEVALUE() to convert text dates to serial numbers before the SUMIFS comparison, or clean the source data with Text to Columns.

More on Pivot-style summaries (formula approach)

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: