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.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Name | Region | Score | ||
| 2 | Ana | East | 72 | 4 | |
| 3 | Ben | West | 88 | 4 | |
| 4 | Cara | East | 95 | 2 | |
| 5 | Dev | West | 61 | ||
| 6 | Eli | East | 50 | ||
| 7 | Fay | West | 100 | ||
| 8 | Gus | East | 83 | ||
| 9 | Hal | West | 47 | ||
| 10 | |||||
| 11 | Min | 60 | |||
| 12 | Max | 90 |
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.