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

Google Sheets is a versatile spreadsheet program that allows users to use formulas to count cells with text. This article provides three examples of how to count cells with text in Google Sheets, using the COUNTIF, SUMPRODUCT, and COUNTIFS functions. With each example, users can see how to use the functions to count cells with specific text or filter for cells that match multiple criteria. This article provides a quick and easy way to learn how to count cells with text in Google Sheets.


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.

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

x