Count Cells With Text in Excel

โฑ๏ธ 2 min read ๐Ÿ“Š Excel

To count only cells containing text (not numbers, not blanks), use COUNTIF(range,"*") โ€” the asterisk wildcard matches any text but skips numeric and empty cells. Mixing this up with COUNTA or COUNT is the usual reason a "count" formula returns a number that doesn't match what you can see on screen.

Quick answer: =COUNTIF(A2:A100,"*") counts cells containing text only. =COUNTA(A2:A100) counts every non-blank cell regardless of type (text, numbers, dates, errors). =COUNT(A2:A100) counts only cells containing numbers. If your count includes cells that look empty, the range likely contains formulas returning "" โ€” COUNTA still counts those because the cell technically isn't blank.

How do I count only cells containing text?

Use COUNTIF with the wildcard criteria "*", which matches any text value but not numbers, dates, or genuinely empty cells.

=COUNTIF(A2:A100, "*")

Counts:  "Apple", "West", "N/A" (typed as text)
Ignores: 100, TRUE, blank cells, dates stored as numbers

To count text cells that also meet another condition, switch to COUNTIFS and add the second range and criteria as usual โ€” the wildcard works the same way inside COUNTIFS.

What is the difference between COUNTA, COUNT, and COUNTIF for this?

The three functions answer different questions: COUNT is numbers-only, COUNTA is "anything at all," and COUNTIF("*") is specifically text.

Range A2:A6: 100, "West", (blank), 250, "N/A"

=COUNT(A2:A6)        โ†’ 2   (only 100 and 250 โ€” numeric cells)
=COUNTA(A2:A6)       โ†’ 4   (everything except the truly blank cell)
=COUNTIF(A2:A6,"*")  โ†’ 2   (only "West" and "N/A" โ€” text cells)

A quick way to remember it: COUNT looks for numbers, COUNTA looks for "not nothing," and COUNTIF("*") looks specifically for text โ€” three different definitions of "has a value."

What's the difference between counting non-blank and non-empty-string cells?

A cell can hold a formula that returns an empty string "" โ€” it looks blank in the grid, but Excel still considers it a non-blank cell because it contains a formula, not nothing.

Cell A2 formula: =IF(B2="","",B2)
If B2 is empty, A2 displays as blank โ€” but:

=COUNTA(A2)          โ†’ 1   (the cell has a formula, so it counts)
=COUNTIF(A2,"*")      โ†’ 1   (the "*" wildcard matches zero or more
                             characters, so a formula-returned ""
                             still counts as text)
=ISBLANK(A2)          โ†’ FALSE (a formula-driven cell is never
                                truly blank, even if it shows "")

This mismatch is the classic reason a COUNTA-based (and COUNTIF("*")-based) total on an imported or formula-driven sheet is higher than what a visual scan suggests โ€” the cells aren't empty to Excel, only empty to the eye. To count cells that visibly hold at least one character (excluding formula-driven blanks), use COUNTIF(range,"?*") instead โ€” the leading ? requires at least one real character, which a zero-length string doesn't satisfy.

Which function should I use for each situation?

You want to count Formula
Cells with numbers only =COUNT(A2:A100)
Any non-blank cell (text, number, date, error) =COUNTA(A2:A100)
Cells containing text specifically =COUNTIF(A2:A100,"*")
Cells with at least one visible character =COUNTIF(A2:A100,"?*")
Truly empty cells (no formula, no value) =COUNTBLANK(A2:A100)

Note that COUNTBLANK, unusually, counts formula cells returning "" as blank โ€” the opposite convention from COUNTA. Combine COUNTIF's criteria syntax with these patterns when you need a conditional text count, and see counting unique values when the goal is distinct entries rather than a raw count.

What are the most common mistakes when counting text cells?

Pro Tip: When cleaning an imported dataset, run all three counts side by side โ€” COUNTA, COUNT, and COUNTIF("*") โ€” in adjacent cells. If COUNTA doesn't equal COUNT plus COUNTIF("*"), some cells hold something that's neither a clean number nor real text (an error value or a logical TRUE/FALSE), which tells you exactly where to look before trusting the data.

โ† Back to Excel Tips