Conditional sums & counts

Sum by month in Excel with SUMIFS

List the first day of each month, then sum dates from that day up to the month's last day.

All Excel versions and Google Sheets

The formula

Excel & Google Sheets (fill down)ExcelGoogle Sheets
=SUMIFS($C$2:$C$9,$A$2:$A$9,">="&E2,$A$2:$A$9,"<="&EOMONTH(E2,0))
In F2 → 300
Excel 365 (one formula for all months)Excel
=SUMIFS(C2:C9,A2:A9,">="&E2:E5,A2:A9,"<="&EOMONTH(E2:E5,0))
In G2, spills: [300], [850], [590], [60]
✓ Tested. All 5 Excel results in this example were recalculated in LibreOffice Calc 25.2 and matched the values shown.

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.

ABCDEFG
1DateRegionAmountMonth
2Feb 27, 2026East300Feb 1, 2026300300
3Mar 1, 2026West450Mar 1, 2026850850
4Mar 9, 2026East120Apr 1, 2026590590
5Mar 15, 2026East80May 1, 20266060
6Mar 31, 2026West200
7Apr 1, 2026East500
8Apr 18, 2026West90
9May 2, 2026East60

How it works

E2
First day of the month (format it as "mmm yyyy").
EOMONTH(E2,0)
Last day of that month.
$C$2:$C$9
Locked ranges so you can fill the formula down.

Common errors and fixes

Month totals are 0?

The month cell is text like "March". Enter a real date (3/1/2026).

Totals include next month's first day?

Use "<"&EOMONTH(E2,0)+1 when dates contain times.

Does this work in Google Sheets?

The formulas tagged "Google Sheets" work as-is. Formulas tagged only "Excel" may need ARRAYFORMULA or a different function in Sheets.