How to Use the COUNTIFS Function in Google Sheets | Count Cells Meeting Multiple Criteria
How to Use the COUNTIFS Function
The COUNTIFS function is a statistical function that counts the number of entries that simultaneously satisfy multiple search criteria (AND conditions).
Syntax
=COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2, ...])
- criteria_range1: The first cell range to evaluate (required).
- criterion1: The criterion to apply to
criteria_range1(number, text, expression, etc.) (required). - criteria_range2, criterion2, …: Additional pairs of ranges and criteria, as many as needed (optional).
Table Example
Here is an example of counting the number of sales deals where "Region is Tokyo" and "Deal Size is 1,000,000 JPY or more" (100 in ten-thousands) from the sales pipeline below.
| Row | Column A (Deal Name) | Column B (Region) | Column C (Deal Size: 10k JPY) |
|---|---|---|---|
| 1 | Deal Name | Region | Deal Size (10k JPY) |
| 2 | Deal A | Tokyo | 120 |
| 3 | Deal B | Osaka | 150 |
| 4 | Deal C | Tokyo | 80 |
| 5 | Deal D | Tokyo | 200 |
| 6 | Deal E | Nagoya | 110 |
- Formula:
=COUNTIFS(B2:B6, "Tokyo", C2:C6, ">=100") - Result:
2(Deal A and Deal D)
Common Errors and Notes
- Mismatched sizes across criteria ranges (
#VALUE!): Everycriteria_rangemust have the exact same number of rows and columns. Mismatched ranges likeB2:B6andC2:C10return a#VALUE!error. - Unpaired arguments:
COUNTIFSalways requires arguments in pairs (range,criterion). Omitting a criterion or adding an extra range alone causes an error. - Filtering by a date range: To count dates between November 1, 2026 and November 30, 2026 inclusive, reference the same date column twice:
=COUNTIFS(A2:A50, ">=2026/11/01", A2:A50, "<=2026/11/30").
Frequently Asked Questions
Q. Can COUNTIFS count OR conditions like "A or B"?
A. COUNTIFS itself evaluates all criteria as AND conditions. To count an OR condition on the same column such as "Tokyo or Osaka", either add two calls like =COUNTIFS(...) + COUNTIFS(...) or use an array with SUM(COUNTIFS(A2:A10, {"Tokyo", "Osaka"})).
Q. What causes a "#VALUE!" error in COUNTIFS?
A. The most common cause is that criteria_range1 and criteria_range2 have different row or column dimensions. For example, if criteria_range1 is A2:A50, make sure criteria_range2 is also the same row span, such as B2:B50.