In this article:

Google Sheets COUNTIF for Multiple Ranges (Easiest way 2024)

Google Sheets COUNTIF Multiple Ranges

In Google Sheets, the COUNTIF function is typically used to count the number of cells within a range that meet a single criterion. However, if you want to count cells across multiple ranges with multiple criteria, you'll need to use a combination of functions like COUNTIF, SUMPRODUCT, or an array formula.

Using COUNTIF with an Array Formula

If you have multiple ranges and you want to count cells that meet the same criterion across these ranges, you can use an array formula with COUNTIF. 

Here's an example:

=SUM(COUNTIF({range1, range2, range3}, criterion))

  • range1, range2, range3: These are the ranges you want to count from.
  • criterion: This is the condition that the cells need to meet.

Wrap the ranges in curly braces {} to create an array and SUM to add up the counts from each range.

Using SUMPRODUCT for Multiple Criteria

If you have different criteria for different ranges, you can use SUMPRODUCT:

=SUMPRODUCT(COUNTIF(range1, criterion1), COUNTIF(range2, criterion2), ...)

  • range1, range2, ...: Different ranges to count from.
  • criterion1, criterion2, ...: Different criteria for each range.

This method multiplies the count of each range-criterion pair and sums them up. It's versatile for more complex criteria and multiple ranges.

How to Use Google Sheets COUNTIF Multiple Ranges

Follow the simple steps below to use the COUNTIF and SUMPRODUCT functions to count items across multiple ranges and with different criteria. 

1. Choose Cells to Count (Identify Ranges)

Identify the specific columns or cells that you want to include in your count. For our tutorial, assume you're interested in counting occurrences of "Apple" in column A (A1:A10) and "Orange" in column B (B1:B10).

google sheets countif multiple ranges

2. Select Destination Cell for Count Result

Click on the cell in your Google Sheets where you want the result of your count to be displayed. This cell will show the final count number from the ranges you've selected.

3. Input COUNTIF for Single Criterion Count

In the selected cell, type the COUNTIF formula for a single criterion across multiple ranges. Use the formula format =SUM(COUNTIF({range1, range2}, "criteria")). For example, to count how many times "Apple" appears in both Column A and Column B, type =SUM(COUNTIF({A1:A10, B1:B10}, "Apple")).

4. Use SUMPRODUCT for Different Criteria in Each Range

If you have different criteria for different ranges, use the SUMPRODUCT function. In the selected cell, type =SUMPRODUCT(COUNTIF(range1, criterion1), COUNTIF(range2, criterion2)). For instance, to count "Apple" in column A and "Orange" in column B, type '=SUMPRODUCT(COUNTIF(A1:A10, "Apple"), COUNTIF(B1:B10, "Orange"))'.

5. Specify Criteria for Each Range in Formula

Within the formula, specify the exact criteria for each range. For example, if your criteria are "Apple" for range A1:A10 and "Orange" for range B1:B10, make sure these are correctly entered in your formula.

6. Finalize Formula and Press Enter

After you have entered your formula, press Enter on your keyboard. Google Sheets will process the formula and display the count based on your specified ranges and criteria. For example, it will show the combined total of "Apple" occurrences in column A and "Orange" occurrences in column B.

7. Modify Ranges or Criteria for Different Counts

If you need to count different items or use different ranges, simply modify the ranges or criteria in the formula. After making your changes, press Enter to update the count. This allows for flexible counting based on your specific data needs.

We hope that you now have a better understanding of how to set up Google Sheets COUNTIF Multiple Ranges.

Use our text automation software to easily set up custom reminders from your spreadsheet in just a few clicks. 

If you enjoyed this article, you might also like our article on how to set up Google Sheets COUNT IF contains function or our article on how to set up the COUNTIF function in Google Sheets. 

If you want to learn how to create an email list in Google Sheets, we also suggest checking out our detailed guide.  

Automate everything you track in spreadsheets with Lido
Learn more

Automate manual tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
Creates a one- or multiple-day calendar event with optional attendees
Adds an object to Hubspot
Create a Slack channel, and optionally add a topic or members
Makes any HTTP request
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
Makes any HTTP request and returns the response
Inserts given array below defined values in given worksheet
Sends an email using your Google account
Sends an email using your Microsoft Outlook account
Sends a Slack message
Sends an SMS message using your Twilio account
Updates cells with given values
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started