Excel COUNTIF Cell Contains Text

This guide treats “excel countif cell contains text” the way busy spreadsheet users actually want it: answer first, a live tool to prove it on your own data, then the reasoning. It is written for Excel but calls out every place Google Sheets differs, and the platform toggle at the top switches all shortcuts between Windows and Mac so nothing here assumes the keyboard you are not on.

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. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “excel countif cell contains text”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. 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. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.

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. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. Treat “excel countif cell contains text” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.

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".