Conditional sums & counts

COUNTIFS between two numbers

Use two criteria on the same range: one lower bound and one upper bound.

All Excel versions (2007+) and Google Sheets

The formula

Between 60 and 90 (inclusive)ExcelGoogle Sheets
=COUNTIFS(C2:C9,">="&B11,C2:C9,"<="&B12)
In E2 → 4
Between, exclusiveExcelGoogle Sheets
=COUNTIFS(C2:C9,">"&B11,C2:C9,"<"&B12)
In E3 → 4
Between + regionExcelGoogle Sheets
=COUNTIFS(C2:C9,">="&B11,C2:C9,"<="&B12,B2:B9,"West")
In E4 → 2
✓ Tested. All 3 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
1NameRegionScore
2AnaEast724
3BenWest884
4CaraEast952
5DevWest61
6EliEast50
7FayWest100
8GusEast83
9HalWest47
10
11Min60
12Max90

How it works

C2:C9,">="&B11
Lower bound.
C2:C9,"<="&B12
Upper bound on the same range.
B2:B9,"West"
Additional condition.

Common errors and fixes

Result 0?

You wrote ">=B11" in quotes. Use ">="&B11.

Numbers stored as text aren't counted?

Convert them to numbers first.

Does this work in Google Sheets?

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