
📎 This article includes 1 downloadable practice file ↓
In this article
COUNTIF counts cells that meet one condition. It is also the simplest duplicate checker.
Syntax
=COUNTIF(range, criteria)
| Argument | What it means |
|---|---|
range |
Cells to check. |
criteria |
Condition, e.g. “Paid”, “>=50000”, “*@gmail.com”. |
Examples
Example 1
=COUNTIF(C:C, "Overdue")
Number of overdue invoices.
Example 2
=COUNTIF($A$2:$A$500, A2)>1
TRUE for duplicate IDs — use it in conditional formatting.
Related functions
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
📎 Practice files for this article
- 📗SUMIFS/COUNTIFS scenarios workbookConditional sums and counts with dates, OR logic and wildcards, plus 4 classic reasons totals come out wrong — all with PASS/FAIL checks.⬇ XLSX · 9 KB
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
✨ Ask AI about this article
Stuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong