How to Count Cells With Text in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Beginner · 5 min read · includes 2 free exercises

In short: Use =COUNTIF(range, "*") to count the cells that contain text. To count cells that contain a particular word, wrap it in asterisks: =COUNTIF(range, "*apple*"). COUNTIF is not case sensitive.

Count every text cell

COUNT counts numbers and COUNTA counts everything that is filled in. Neither counts only text. For that, use COUNTIF with a wildcard. In a text criterion, * stands for zero or more characters, so "*" matches text cells.

The example

Here is a list in cells A1:A7. It holds four text entries, one number (42) and one empty cell.

A
1Item
2Apple pie
342
4Banana
5
6Pineapple
7Apple juice
=COUNTIF(A2:A7, "*")

This returns 4: Apple pie, Banana, Pineapple and Apple juice. The number 42 and the empty cell are not counted, because they are not text.

Count cells that contain a word

Put asterisks on both sides of the word to match it anywhere in the cell:

=COUNTIF(A2:A7, "*apple*")

This returns 3: Apple pie, Pineapple and Apple juice. The match is not case sensitive, as Google's COUNTIF page notes, so "*apple*" finds Apple. Use "apple*" for cells that start with the word, and "*apple" for cells that end with it. To match a literal * or ?, put a tilde in front of it.

Which function for which count?

You want to countUse
Cells with numbersCOUNT
Cells with anything in themCOUNTA
Cells with textCOUNTIF(range, "*")
Cells containing a wordCOUNTIF(range, "*word*")
Cells meeting two conditionsCOUNTIFS

Common mistakes

Try it yourself

Use the list above (A1:A7). Type your formula into the box, starting with =, then press Check.

Exercise 1: All text cells

Write a formula that counts the cells in A2:A7 that contain text.

Hint: the criterion is "*".

Exercise 2: Contains a word

Write a formula that counts the cells in A2:A7 that contain the word apple anywhere.

Hint: put asterisks on both sides of the word.

What to learn next

Syntax and rules in this guide were checked against Google's Count cells with text help page. See all guides.