Conditional sums & counts

SUMIFS between two dates

Put the start and end dates in cells and join them to comparison operators with &.

All Excel versions (2007+) and Google Sheets

The formula

Excel & Google SheetsExcelGoogle Sheets
=SUMIFS(C2:C9,A2:A9,">="&B11,A2:A9,"<="&B12)
In E2 → 850
Date range + regionExcelGoogle Sheets
=SUMIFS(C2:C9,A2:A9,">="&B11,A2:A9,"<="&B12,B2:B9,"East")
In E3 → 200
✓ Tested. All 2 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.

ABCDE
1DateRegionAmount
2Feb 27, 2026East300850
3Mar 1, 2026West450200
4Mar 9, 2026East120
5Mar 15, 2026East80
6Mar 31, 2026West200
7Apr 1, 2026East500
8Apr 18, 2026West90
9May 2, 2026East60
10
11FromMar 1, 2026
12ToMar 31, 2026

How it works

C2:C9
Values to add.
A2:A9,">="&B11
Dates on or after the start date.
A2:A9,"<="&B12
Dates on or before the end date.
B2:B9,"East"
Any extra criteria pairs.

Common errors and fixes

Result is 0?

The operator is inside the cell reference: use ">="&B11, not ">=B11".

Last day missing?

Dates carry times (e.g. 3/31 14:00). Use "<"&B12+1 instead of "<="&B12.

Why does the formula return #VALUE!?

Ranges are different sizes.

Does this work in Google Sheets?

Yes. The formulas on this page work the same way in Google Sheets.