In Excel: use =COUNTIF(range, criteria) — it counts how many cells in range meet a single condition you specify.
Syntax
Arguments
| Argument | Description | |
|---|---|---|
range | required | The cells to examine, such as a column of statuses or values. |
criteria | required | The condition a cell must meet to be counted, like "Done", ">=50" or "A*". |
Related functions
Grand total: 1,250.50
| Region | Sum |
|---|---|
| West | 125.50 |
| East | 1050 |
| South | 75 |
The same thing in your own sheet
Sum · Excel & Sheets
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
COUNTIF tallies cells that satisfy one condition. It scans range and counts every cell matching the criteria, which can be exact text, a number, a comparison like ">=50", or a wildcard pattern. It answers questions like how many orders are "Shipped", how many scores are at least 60, or — by counting a value against its own column — how many times an entry is duplicated. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “excel countif unique values” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
Order statuses are in C2:C200. To count how many are shipped: =COUNTIF(C2:C200, "Shipped"), returning say 143. To count scores of 60 or higher in B2:B200: =COUNTIF(B2:B200, ">=60"). To find duplicates of the value in A2, count it against the whole column: =COUNTIF(A:A, A2) — a result above 1 means the value repeats. COUNTIF is the quickest way to answer "how many" against one condition — open tasks, passing grades, repeated entries — without filtering or a pivot table. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. If you take one thing from this page on “excel countif unique values”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.
Common mistakes
- Forgetting the quotes around a comparison — ">=60" must be a quoted string, not >=60 on its own.
- Expecting
COUNTIFto handle two conditions; for multiple criteria useCOUNTIFSinstead. - Counting blanks unexpectedly — "" and truly empty cells behave differently, so use "<>"&"" for non-blanks or
COUNTBLANKfor blanks.
Frequently asked questions
How do I count cells greater than a number?
Put the operator and value in quotes as the criteria: =COUNTIF(B2:B100, ">50"). The same works for ">=", "<", "<=" and "<>" for not-equal.
How do I count duplicate values with COUNTIF?
Compare each value to the whole column: =COUNTIF(A:A, A2) returns how many times A2 appears. Filling it down and looking for results above 1 highlights every duplicate.
Can COUNTIF count partial text?
Yes, with wildcards: "*report*" counts cells containing "report" anywhere, "A*" counts cells starting with A, and "?at" counts three-letter cells ending in "at".