COUNTIF Function in Excel: Syntax, Examples & Practice
Learn the Excel COUNTIF function: Counts cells meeting one condition. Try focused practice and download a free workbook.
Syntax
=COUNTIF(range, criteria)
Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.
Worked example
| Row | A: Employee | B: City | C: Status | D: Collection | E: Notes | F: City criterion | G: Status criterion |
|---|---|---|---|---|---|---|---|
| 2 | Amit | Mumbai | Active | 45000 | Mumbai | Active | |
| 3 | Priya | Pune | Active | 62000 | |||
| 4 | Ravi | Mumbai | Closed | 38000 | |||
| 5 | Neha | Mumbai | Active | 55000 |
=COUNTIF(C2:C5,"Active")
Expected result: 3
City, Status and Collection are aligned by row. F2 and G2 contain the helper criteria used in the practice questions.
Professional use
Count branch, status or bucket records.
Practice COUNTIF · Download practice .xlsx
Apply your skills
- Inventory & Reorder Planning — 45–60 min; uses COUNTIF in a formula checkpoint.
- HR Headcount & Training Analytics — 45–60 min; uses COUNTIF in a formula checkpoint.
Questions and answers
How can I practise COUNTIF?
Use the focused ten-question COUNTIF lab, then download its workbook for ten additional function-specific tasks and an answer key. Core learning works without an account.
Which Excel version supports COUNTIF?
Check the function documentation for your Excel version and platform. The browser simulator implements selected behavior and does not reproduce every Excel feature.
Does the browser simulator replace Microsoft Excel?
No. It supports a selected set of formula behavior for practice. Native workbook recalculation, full function compatibility, PivotTables and external data features must be checked in your own Excel installation.
Interactive practice runs in your browser.