COUNTIFS Function

COUNTIFS Function

COUNTIFS Function

Count how many rows meet multiple conditions. Useful when one filter is not enough.

ExcelClash Team
PUBLISHED

Summary

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.

Purpose

Count with multiple conditions

Returns how many rows satisfy all the criteria you set.

Return Value

Number

Returns the count of rows where every condition is met.

Syntax

=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)

Each condition is written as a pair: one range and one matching rule.

Arguments

  • criteria_range1 - [required] The first range Excel checks.
  • criteria1 - [required] The rule for that range.
  • criteria_range2, criteria2, ... - [optional] More range and criteria pairs. Excel supports up to 127 pairs.

COUNTIFS vs Other Functions

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

Using the COUNTIFS Function

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.

Example 1 - Count Sales rows in the North

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.
Check Answer
Challenge #1
Target: Sheet1!F1
Multi-Rule Tally

Count how many rows have Dept "Sales" and Region "North". Formula: =COUNTIFS(A1:A10,"Sales",B1:B10,"North").

Example 2 - Count rows after a date and above a threshold

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.
Check Answer
Challenge #2
Target: Sheet1!F2
Date and Status Filter

Count how many rows are after 1/1/2026 and marked Done. Formula: =COUNTIFS(A1:A10,">1/1/2026",B1:B10,"Done").

Example 3 - Count wildcard text plus another condition

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.
Check Answer
Challenge #3
Target: Sheet1!F3
Wildcard and Priority Check

Count regions starting with "North" that also have status "High". Formula: =COUNTIFS(A1:A10,"North*",B1:B10,"High").

Example 4 - Use cells for the criteria

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.
Check Answer
Challenge #4
Target: Sheet1!F4
Dynamic Category Boxes

Count rows matching D1 and D2. Formula: =COUNTIFS(A1:A10,D1,B1:B10,D2).

Conclusion Recap

  • Main job: COUNTIFS counts rows that meet multiple conditions.
  • Conditions are checked row by row: A row is counted only when every rule is true.
  • Ranges must match in shape: Each criteria range needs the same rows and columns as the first one.
  • Flexible criteria: You can use text, numbers, operators, wildcards, and cell references.
  • Good for precise filtering: It is useful when one condition is not specific enough.
  • Related option: Use COUNTIF when you only need one condition.
Tactical Arena
Select Scenario:
Share COUNTIFS Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.