3.1 C
London
Friday, December 20, 2024
HomeSoftware TutorialsGoogle SheetsHow to Use COUNTIF with OR in Google Sheets

How to Use COUNTIF with OR 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...

Often you may want to count the number of cells in a range in Google Sheets that meet one of several criteria.

You can use the following basic syntax to do so:

=ArrayFormula(SUM(COUNTIF(A:A,{"Value1", "Value2", "Value3"})))

This particular formula counts the number of cells in column A that are equal to “Value1”, “Value2”, or “Value3.”

The following example shows how to use this syntax in practice.

Example: Use COUNTIF with OR in Google Sheets

Suppose we have the following data in Google Sheets:

We can use the following formula to count the number of cells in column A that have a value of “East” or “South”:

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

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

We can see that a total of 5 cells have a value of “East” or “South” in column A. 

We can also use the following formula to count the number of cells in column C that have a value of 95, 99, or 103:

=ArrayFormula(SUM(COUNTIF(C:C,{95, 99, 103})))

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

We can see that a total of 6 cells have a value of 95, 99, or 103 in column C.

Additional Resources

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

Google Sheets: How to Use COUNTIF From Another Sheet
Google Sheets: How to Use COUNTIF with Multiple Ranges
Google Sheets: How to Use COUNTIFS with a Date Range

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