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.
* matches any text value, so COUNTIF returns the number of text cells — numbers and blanks are skipped.
The example
A mixed column — text, numbers, and a blank.
| A | B | |
|---|---|---|
| 1 | Value | |
| 2 | Apple | |
| 3 | 42 | |
| 4 | Pear | |
| 5 | ||
| 6 | Text=2 · Numbers=1 · Non-blank=3 |
The formula
Three different counts of the same column:
How it works
Each function counts a different thing:
COUNTcounts only cells that hold a number — here just the 42, so1.COUNTAcounts every non-empty cell, text or number — Apple, 42, Pear =3.COUNTIF(range, "*")counts only text cells (the*wildcard only matches text) — Apple, Pear =2.- COUNTBLANK counts the empties — the one blank cell =
1.
Try it: interactive demo
Edit the comma list (mix words, numbers, leave gaps); see each count.
Variations
Count numbers only
COUNT ignores text and blanks:
Count non-blank cells
COUNTA counts anything with content:
Count blank cells
COUNTBLANK counts the empties:
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
Frequently asked questions
How do I count cells that contain text in Excel?
What's the difference between COUNT and COUNTA?
How do I count non-blank or blank cells?
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