
Count how many rows meet multiple conditions. Useful when one filter is not enough.
COUNTIFS counts how many rows meet multiple conditions. It is the multi-condition version of COUNTIF, so instead of checking one rule, you can stack several rules together.
This is helpful when you want a more precise answer. You might not want to count all Sales rows. You might want to count Sales rows in the North region, or tasks after a certain date that are also marked Done. COUNTIFS is built for that kind of filtered tally.
Returns how many rows satisfy all the criteria you set.
Returns the count of rows where every condition is met.
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Each condition is written as a pair: one range and one matching rule.
| Function | What it does | Use it when |
|---|---|---|
COUNTIFS |
Counts with multiple conditions | You need two or more rules at once |
COUNTIF |
Counts with one condition | You only need one rule |
COUNT |
Counts numbers | You want a numeric count with no conditions |
COUNTA |
Counts non-empty cells | You want a filled-cell count with no conditions |
The key rule is that every condition must line up on the same row. Excel checks the first cell in each criteria range together, then the second cell in each range together, and so on. The count only increases when all conditions are true for that row.
Microsoft notes that every criteria range must have the same number of rows and columns as the first criteria range. The ranges do not have to sit next to each other, but they do need to match in shape. If you point to mismatched ranges, the logic breaks down.
Criteria can be numbers, expressions, text, or cell references. Wildcards work too. The question mark ? matches one character, and the asterisk * matches any sequence of characters. Microsoft also notes that if a criteria argument points to an empty cell, COUNTIFS treats that empty criteria as 0.
This is the basic two-condition case. A row only counts if it matches both the department and the region.
=COUNTIFS(A1:A10,"Sales",B1:B10,"North") // Counts rows that match both conditions.
Count how many rows have Dept "Sales" and Region "North". Formula: =COUNTIFS(A1:A10,"Sales",B1:B10,"North").
Here one condition checks the date and the other checks the value. Both have to be true at the same time.
=COUNTIFS(A1:A10,">1/1/2026",B1:B10,">80") // Counts rows that meet both rules.
Count how many rows are after 1/1/2026 and marked Done. Formula: =COUNTIFS(A1:A10,">1/1/2026",B1:B10,"Done").
Wildcards are useful when labels share a pattern but are not identical in every row.
=COUNTIFS(A1:A10,"North*",B1:B10,"High") // Counts matching North rows with High status.
Count regions starting with "North" that also have status "High". Formula: =COUNTIFS(A1:A10,"North*",B1:B10,"High").
Putting the criteria in cells makes the formula easier to reuse and easier to update later.
=COUNTIFS(A1:A10,D1,B1:B10,D2) // Uses D1 and D2 as the criteria.
Count rows matching D1 and D2. Formula: =COUNTIFS(A1:A10,D1,B1:B10,D2).
COUNTIF when you only need one condition.Tell your friends about this post