4.5 C
London
Thursday, December 19, 2024
HomeSoftware TutorialsGoogle SheetsHow to Use COUNTIF Contains in Google Sheets

How to Use COUNTIF Contains in Google Sheets

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 formulas in Google Sheets to count the number of cells that contain certain strings:

Method 1: COUNTIF Contains (One Criteria)

=COUNTIF(A2:A11, "*string*")

This formula counts the number of cells in A2:A11 that contain “string” anywhere in the cell.

Method 2: COUNTIF Contains (Multiple Criteria)

=COUNTIFS(A2:A11, "*string1*", B2:B11, "*string2*")

This formula counts the number of rows where the cell in the range A2:A11 contains “string1” and the cell in the range B2:B11 contains “string2.”

Note: The * operator is a wildcard character in Google Sheets.

The following examples show how to use each method in practice.

Example 1: COUNTIF Contains (One Criteria)

We can use the following formula to count the number of cells in the Team column that contain the string “Mav”:

=COUNTIF(A2:A11,"*Mav*")

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

From the output we can see that 5 rows in the Team column contain “Mav” somewhere in their cell.

Example 2: COUNTIF Contains (Multiple Criteria)

We can use the following formula to count the number of rows where the Team column contains “Mav” and the Position column contains “Guar”:

=COUNTIFS(A2:A11, "*Mav*", B2:B11, "*Guar*")

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

From the output we can see that 2 rows contain “Mav” in the Team column and “Guar” in the Position column.

Additional Resources

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

Google Sheets: COUNTIF Greater Than Zero
Google Sheets: How to Use COUNTIF with OR
Google Sheets: How to Use COUNTIF From Another Sheet

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