4.5 C
London
Thursday, December 19, 2024
HomeSoftware TutorialsGoogle SheetsHow to Count Cells with Text in Google Sheets (3 Examples)

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

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

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

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories