In this article:

Google Sheets COUNTIF for Multiple Ranges (Easiest way 2024)

February 1, 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.  

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->