How it works.
COUNTIF is a statistical Excel function that tallies the occurrences of items that meet a specific condition. It supports numbers, text, dates, wildcards (* and ?), and logical comparison operators (like ">100" or "<=50").
💡 In simple terms.
Counts how many cells in a list match a rule you specify, such as counting scores over 75 or orders marked "Yes".
"Think of COUNTIF like a bouncer at a club checking IDs. It looks down your list and counts only the people who meet your rule (e.g. age 21 or over)."
Formula syntax.
Standard Excel Notation=COUNTIF(range, criteria)[like_this] are optional; all other arguments are required.Formula arguments.
Every parameter accepted by the COUNTIF function is detailed below.
The group of cells you want to count.
Example value:B2:B6The condition that defines which cells to count. Can be a number, text, expression, or cell reference.
Example value:">=100"Simple example.
Step-by-Step ScenarioCount High-Value Transactions
Count how many transactions in column B are greater than or equal to $100.
| Customer | Purchase Amount | Status | Criteria | Count Result |
|---|---|---|---|---|
| Alice | 150 | Completed | >=100 | — |
| Bob | 85 | Completed | — | — |
| Charlie | 210 | Pending | — | — |
=COUNTIF(B2:B6, ">=100")Evaluates COUNTIF over the sample table cells, placing the verified output in cell E2.
Formula generator.
Full Generator WizardCustomize the argument fields below to generate a tailored COUNTIF formula ready to paste directly into your worksheet.
=COUNTIF()Expected result behavior.
Returns number 3 based on sample evaluation criteria and active cell references.
Best Practices
- Use wildcards to find partial text matches: "*east*" matches any cell containing "east".
- When using logical operators with numbers, enclose the operator and number in double quotes: ">=100".
- For case-insensitive counts, COUNTIF automatically ignores uppercase/lowercase differences.
Common Mistakes
- COUNTIF only supports a single condition. If you need to count cells meeting multiple conditions, use COUNTIFS.
- Text strings over 255 characters return incorrect results in COUNTIF.
Platform & version compatibility.
Verified platform compatibility matrix based on actual spreadsheet calculation engine specifications.
Core standard function supported across all modern and legacy Microsoft Excel versions (365, 2021, 2019, 2016, 2013, 2010), as well as Excel for the Web and Mac.
100% compatible with Google Sheets. Uses identical argument order, data types, and standard calculation logic.
Frequently asked questions.
Technical Q&ACan COUNTIF evaluate multiple conditions at once?↓
No, COUNTIF only checks a single condition. To count rows matching multiple simultaneous criteria, use the COUNTIFS function.
How do wildcards work in COUNTIF?↓
You can use an asterisk (*) to match any series of characters (e.g. =COUNTIF(A2:A10, "*East*")) or a question mark (?) to match any single character. To match an actual question mark or asterisk, prepend a tilde (~).