How to Count Cells with Text in Google Sheets (3 Examples)


You can use the following methods to count cells with a particular text in Google Sheets:

Method 1: Count Cells with Any Text

=COUNTA(A1:A10)

Method 2: Count Cells with Specific Text

=COUNTIF(A1:A10, "Text")

Method 3: Count Cells with One of Specific Texts

=ArrayFormula(SUM(COUNTIF(A:A,{"Text1", "Text2"})))

The following examples show how to use each method with the following dataset in Google Sheets:

Example 1: Count Cells with Any Text

We can use the following formula to count the number of cells with any text in column A:

=COUNTA(A2:A12)

The following screenshot shows how to use this formula in practice:

We can see that there are 8 cells with any text in column A.

Example 2: Count Cells with Specific Text

We can use the following formula to count the number of cells with the text “A” in column A:

=COUNTIF(A2:A12, "A")

The following screenshot shows how to use this formula in practice:

We can see that there are 2 rows with the text “A” in column A.

Example 3: Count Cells with One of Specific Texts

We can use the following formula to count the number of cells with the text “A” or “B” in column A:

=ArrayFormula(SUM(COUNTIF(A:A,{"A", "B"})))

The following screenshot shows how to use this formula in practice:

We can see that there are 5 rows with the text “A” or “B” in column A.

Additional Resources

The following tutorials explain how to perform other common operations in Google Sheets:

Google Sheets: How to Filter for Cells that Contain Text
How to Use COUNTIF with OR in Google Sheets
Google Sheets: How to Use SUMIF with Multiple Columns

Leave a Reply

Your email address will not be published. Required fields are marked *