COUNTIF
Part of the Formulas and Data Analysis section of Coddy's Excel journey. Lesson 11 of 28.
COUNTIF(range, criteria) counts cells matching one condition. A text criterion can come from a cell. Numeric comparisons such as ">=50" are text criteria and need quotation marks when written directly in the formula.
A2 contains East, A3 contains West, A4 contains East.
Example: =COUNTIF(A2:A4,"East").
Two cells match the requested region. The result counts matches rather than adding amounts.
COUNTIF counts matching cells in one range.
The practice sheet highlights cells where you should enter formulas. The same formulas must work when the tests replace the input data.
Challenge
EasyRegions are in A2:A5; the selected region is in E2. In F2, count how many rows belong to that region.
Enter formulas in the highlighted output cells: F2. Keep the supplied data and headings. Tests change input values, so use cell references instead of typing the sample answers. Use English function names and commas between arguments.
Try it yourself
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Region | Status | Sales | Region choice | Result | ||
| 2 | East | Paid | 40 | East | |||
| 3 | West | Paid | 70 | ||||
| 4 | East | Open | 30 | ||||
| 5 | East | Paid | 60 | ||||
| 6 | |||||||
| 7 | |||||||
| 8 | |||||||
| 9 | |||||||
| 10 | |||||||
| 11 | |||||||
| 12 | |||||||
| 13 | |||||||
| 14 |
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Formulas and Data Analysis
Practice on your own: Excel playground