# How to count cells that contain any text in Excel

Use a lone asterisk as the criteria: `=COUNTIF(B2:B10,"*")` counts cells that hold text and skips numbers, dates and blanks.

**Excel:** `=COUNTIF(B2:B10,"*")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D |
| --- | --- | --- | --- |
| Student | Score |  | Text entries |
| Ava | 88 |  |  |
| Ben | Absent |  |  |
| Chloe | 92 |  |  |
| Dan |  |  |  |
| Eve | Excused |  |  |
| Finn | 75 |  |  |
| Gia | Absent |  |  |
| Hugo | 81 |  |  |
| Iris | 64 |  |  |

Formula in E1: `=COUNTIF(B2:B10,"*")`

Result: 4

## How it works

The asterisk wildcard matches any text of any length, and wildcards only ever match text. So `"*"` counts "Absent" and "Excused" but not the numeric scores or the blank cell.

Iris's "64" is counted too: it was typed or imported as text, which is exactly the kind of cell this count helps you find.

## Other ways

- `=SUMPRODUCT(--ISTEXT(B2:B10))`: ISTEXT tests each cell; the same count, and easy to combine with other conditions.
- `=COUNTA(B2:B10)-COUNT(B2:B10)`: Everything that isn't empty, minus the numbers. Same here, but it also counts errors and TRUE/FALSE values.

## Common mistakes

- A formula that returns `""` counts as text for `"*"`, even though the cell looks empty. Use `=COUNTIF(B2:B10,"?*")` to require at least one character.
- Numbers stored as text, like "64" here, are text. If they should be scores, convert them so averages include them.

## Questions

**How do I count cells that contain only numbers?**

Use `=COUNT(B2:B10)`, which counts numbers and dates.

**How do I count text cells that meet another condition?**

Combine the wildcard with COUNTIFS: `=COUNTIFS(B2:B10,"*",A2:A10,"<>Dan")`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/count-cells-with-any-text
