GuidesGoogle Sheets

How to count cells with text in Google Sheets

Learn how to count cells with text in Google Sheets using COUNTA, COUNTIF, and wildcards for exact or partial text matches.

Quick answer

To count cells with text in Google Sheets, use COUNTIF with a wildcard like =COUNTIF(A1:A10,"*") to count any text, or COUNTA to count all non-empty cells including numbers. For matching specific words, use =COUNTIF(A1:A10,"Apple"). Select an empty cell, type the formula, adjust the range, and press Enter to see the result instantly.

Steps at a glance

  1. Click an empty cell to hold your result
  2. Type =COUNTA(range) to count all non-blank cells
  3. Type =COUNTIF(range,"*") to count text-only cells
  4. Use =COUNTIF(range,"word") for an exact text match
  5. Add wildcards like "*word*" for partial matches
  6. Press Enter to display the count

Summary

Counting cells with text lets you quickly measure how much data in a column or row is text-based rather than numeric or blank. Google Sheets handles this with two main functions, COUNTA and COUNTIF, each suited to different counting needs.

Step-by-step guide

  1. Step 1

    Open your spreadsheet and pick a result cell

    Open the Google Sheets file containing the data you want to analyze. Click on an empty cell where you want the count to appear, ideally in a column or area separate from your main data set.

  2. Step 2

    Count all non-blank cells with COUNTA

    Type =COUNTA(A1:A20), adjusting the range to match your data, then press Enter. COUNTA counts every cell that isn't empty, including both text and numbers, so use this when you want a total of all filled cells regardless of type.

  3. Step 3

    Count only text cells with COUNTIF and a wildcard

    To count cells that contain text specifically, type =COUNTIF(A1:A20,"*") and press Enter. The asterisk wildcard tells Sheets to match any cell containing one or more text characters, excluding numbers and blanks from the count.

  4. Step 4

    Count cells with a specific word or value

    If you need to count how many times an exact word appears, use =COUNTIF(A1:A20,"Apple"), replacing "Apple" with your target text. This is useful when tallying survey answers, status labels, or product names in a list.

  5. Step 5

    Count cells containing part of a word

    To match text that contains a certain string anywhere in the cell, wrap your search term in wildcards like =COUNTIF(A1:A20,"*ship*"). This catches variations such as "shipping" or "shipped" in a single formula. Pairing this with the use-if-formula function lets you build more advanced conditional counts if you need multiple criteria.

  6. Step 6

    Combine counts with filters or pivot tables

    For larger data sets, create a filter to isolate rows before counting, or build a pivot table to break down text counts by category automatically. Both approaches work well alongside COUNTIF when you're analyzing recurring text values across many columns.

  7. Step 7

    Double-check your range and results

    Review the count returned by your formula against a quick manual scan of a few rows to confirm accuracy. If the range doesn't cover your full data set, extend it by editing the cell references directly in the formula bar.

Why this matters

You're reviewing a survey response sheet or sales list and need to know how many entries contain a specific answer, product name, or any text at all. Counting cells with text lets you quickly summarize data without manually scrolling through hundreds of rows.

Frequently asked questions

  • What's the difference between COUNTA and COUNTIF for counting text?

    COUNTA counts every non-empty cell, including numbers and dates, while COUNTIF with a wildcard ("*") counts only cells containing text characters. Use COUNTA for a general fill count and COUNTIF when you specifically need text-only results.

  • Can I count cells that contain part of a word, not an exact match?

    Yes. Use COUNTIF with wildcards on both sides of your search term, like =COUNTIF(A1:A20,"*keyword*"), to count any cell containing that keyword anywhere in its text.

  • How do I count cells that do not contain specific text?

    Use =COUNTIF(A1:A20,"<>*keyword*") to count cells that don't match a given text pattern. This works the same way as a positive wildcard match but excludes matching cells instead.

  • Can I count text cells across multiple sheets at once?

    Yes, by referencing another sheet in your formula, such as =COUNTIF(Sheet2!A1:A20,"*"). You can also pull data from another spreadsheet entirely using an import function before applying your count formula.

Create interactive demos like this one — free, no coding required.

Start for free →