Count by category
| A | B | C | |
|---|---|---|---|
| 1 | Region | Rep | Amount |
| 2 | East | Ana | 1200 |
| 3 | West | Ben | 850 |
| 4 | East | Cara | 430 |
| 5 | North | Dan | 970 |
| 6 | West | Eli | 1500 |
| 7 | East | Ana | 610 |
Formula: E2: =COUNTIF(A2:A7,"East")
Result: 3
Three rows have East in the Region column.
Counts cells that meet a condition.
COUNTIF(range, criteria)Example: =COUNTIF(B2:B10,">100")
Available in: All versions
COUNTIF counts the cells in a range that meet one condition: =COUNTIF(range, criteria). Use it to count how many orders came from a region, how many scores pass, or how many times a name appears.
| A | B | C | |
|---|---|---|---|
| 1 | Region | Rep | Amount |
| 2 | East | Ana | 1200 |
| 3 | West | Ben | 850 |
| 4 | East | Cara | 430 |
| 5 | North | Dan | 970 |
| 6 | West | Eli | 1500 |
| 7 | East | Ana | 610 |
Formula: E2: =COUNTIF(A2:A7,"East")
Result: 3
Three rows have East in the Region column.
| A | B | C | |
|---|---|---|---|
| 1 | Region | Rep | Amount |
| 2 | East | Ana | 1200 |
| 3 | West | Ben | 850 |
| 4 | East | Cara | 430 |
| 5 | North | Dan | 970 |
| 6 | West | Eli | 1500 |
| 7 | East | Ana | 610 |
Formula: E2: =COUNTIF(C2:C7,">=1000")
Result: 2
Counts amounts of 1000 or more: 1200 and 1500.
| A | B | C | |
|---|---|---|---|
| 1 | Region | Rep | Amount |
| 2 | East | Ana | 1200 |
| 3 | West | Ben | 850 |
| 4 | East | Cara | 430 |
| 5 | North | Dan | 970 |
| 6 | West | Eli | 1500 |
| 7 | East | Ana | 610 |
Formula: E2: =COUNTIF(B2:B7,"A*")
Result: 2
Counts names that start with A. Ana appears twice.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in F2: =COUNTIF(C2:C7,">50")
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Price | Result | |
| 2 | East | Pen | 120 | 2.5 | 3 | |
| 3 | West | Pen | 80 | 2.5 | ||
| 4 | East | Book | 45 | 12 | ||
| 5 | North | Book | 60 | 12 | ||
| 6 | West | Lamp | 30 | 25 | ||
| 7 | East | Lamp | 15 | 25 |
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page