Excel COUNTIF Two Criteria

If you just need to excel countif two criteria and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: use =COUNTIF(range, criteria) — it counts how many cells in range meet a single condition you specify.

Syntax

=COUNTIF(range, criteria)

Arguments

ArgumentDescription
rangerequiredThe cells to examine, such as a column of statuses or values.
criteriarequiredThe condition a cell must meet to be counted, like "Done", ">=50" or "A*".

Related functions

COUNTIFSSUMIFIF
ƒxQuick Pivot SummarizerLive
Groups
3

Grand total: 1,250.50

RegionSum
West125.50
East1050
South75

The same thing in your own sheet

Sum · Excel & Sheets

Put your group keys in a column (here starting at E2) and fill the formula down.
Real pivot table: Excel — select your data, Insert → PivotTable, drag the group column to Rows and the value column to Values. Google Sheets — select the data, Insert → Pivot table. · Runs entirely in your browser — your data never leaves this page.
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

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. For “excel countif two criteria”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. 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 is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.

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. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. The short version of “excel countif two criteria”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.

Common mistakes

  • Forgetting the quotes around a comparison — ">=60" must be a quoted string, not >=60 on its own.
  • Expecting COUNTIF to handle two conditions; for multiple criteria use COUNTIFS instead.
  • Counting blanks unexpectedly — "" and truly empty cells behave differently, so use "<>"&"" for non-blanks or COUNTBLANK for 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".