Excel COUNTIF function🔀 Count with a condition
The COUNTIF function: Count with a condition. Count passes, count unsent orders. This page shows the syntax, a worked example with its result and how the formula reads.
What does COUNTIF do?
Count with a condition. Count passes, count unsent orders
COUNTIF syntax
=COUNTIF(range, criteria)
Arguments in square brackets [ ] are optional · argument names follow Microsoft's documentation
COUNTIF example with the result
=********
👑 Ready-to-use example formula for VIP supporters only · Become VIP
Formula in cell B6 Yellow cells = result
| A | B | |
|---|---|---|
| 1 | Name | Result |
| 2 | Ton | Pass |
| 3 | Fon | Fail |
| 4 | Bee | Pass |
| 5 | Mod | Pass |
| 6 | Passed | 3 |
How it reads: Counts cells in B2:B5 that say Pass · also works with ">50", "<>0", "*coffee*"
Frequently asked questions about COUNTIF
What does COUNTIF do?
Count with a condition. Count passes, count unsent orders
What does the COUNTIF example return?
The example formula in cell B6 gives 3.
Which Excel versions have COUNTIF?
It has been in Excel for many versions and works in the versions in common use today, including Excel for Microsoft 365.
🕸️ More logic formulas and related ones
Source: support.microsoft.com
Checked 17 November 2026 · by Black Sheep Barn · example results are calculated by the app's example engine, for learning