Count Cells with Text (or Numbers)

Excel Formulas › Count

All versionsCOUNTACOUNT

Excel has a different counter for each kind of cell: COUNT for numbers, COUNTA for anything non-blank, and COUNTIF for text specifically. Knowing which is which stops a lot of off-by-a-few headaches.


Quick formula: to count just the text cells in A2:A8:
=COUNTIF(A2:A8, "*")
The lone * matches any text value, so COUNTIF returns the number of text cells — numbers and blanks are skipped.

Functions used (tap for the full reference guide):

The example

A mixed column — text, numbers, and a blank.

AB
1Value
2Apple
342
4Pear
5
6Text=2 · Numbers=1 · Non-blank=3

The formula

Three different counts of the same column:

=COUNTIF(A2:A5, "*") → 2 (text) =COUNT(A2:A5) → 1 (numbers) =COUNTA(A2:A5) → 3 (non-blank)

How it works

Each function counts a different thing:

  1. COUNT counts only cells that hold a number — here just the 42, so 1.
  2. COUNTA counts every non-empty cell, text or number — Apple, 42, Pear = 3.
  3. COUNTIF(range, "*") counts only text cells (the * wildcard only matches text) — Apple, Pear = 2.
  4. COUNTBLANK counts the empties — the one blank cell = 1.

Try it: interactive demo

Live demo

Edit the comma list (mix words, numbers, leave gaps); see each count.

Variations

Count numbers only

COUNT ignores text and blanks:

=COUNT(A2:A8)

Count non-blank cells

COUNTA counts anything with content:

=COUNTA(A2:A8)

Count blank cells

COUNTBLANK counts the empties:

=COUNTBLANK(A2:A8)

Pitfalls & errors

COUNT vs COUNTA is the classic trap. COUNT only counts numbers; COUNTA counts everything non-blank. If your “count” is too low, you probably want COUNTA.

Formulas returning "" aren’t truly blank. COUNTA counts them (they have content); COUNTBLANK does too (it treats "" as blank). They can disagree — know which you need.

Numbers stored as text count as text (in COUNTIF "*"), not as numbers (in COUNT). Clean the data if the split looks wrong.

Practice workbook

📊
Download the free Count Cells with Text (or Numbers) practice workbook
A mixed column with live COUNT/COUNTA/COUNTIF/COUNTBLANK side by side, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I count cells that contain text in Excel?
Use =COUNTIF(range, "*"). The single asterisk matches any text value, so it counts text cells while ignoring numbers and blanks.
What's the difference between COUNT and COUNTA?
COUNT counts only cells containing numbers. COUNTA counts all non-empty cells, including text. Use COUNTA when you want every filled cell regardless of type.
How do I count non-blank or blank cells?
COUNTA counts non-blank cells and COUNTBLANK counts empty ones. Note that formulas returning "" are counted as blank by COUNTBLANK.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Count cells that contain text · Count blank cells · Count words in a cell

Function references: COUNTA · COUNT · COUNTIF