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.

COUNTIFS is useful when the workbook needs a count that depends on several conditions together. It becomes especially valuable in reporting tables where one simple rule is not enough to describe the subset that should be counted.

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 example shows the basic COUNTIFS idea. Excel checks the department and region on the same row, and the count goes up only when both conditions are true together.

That makes the result more specific than a one-condition count. You are not counting all Sales rows or all North rows, only the overlap between the two groups.

=COUNTIFS(A1:A10,"Sales",B1:B10,"North") // Counts rows that match both conditions.
Check Answer
Challenge #1
Target: Sheet1!E1

Count the rows where Dept is Sales and Region is North.

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

Here one condition checks the date and the other checks the value in a different column. This is a useful example because it shows how COUNTIFS can combine time-based logic with a performance rule.

The row counts only when both checks pass. That is what makes the final tally more precise than a simple one-rule filter.

=COUNTIFS(A1:A10,">1/1/2026",B1:B10,">80") // Counts rows that meet both rules.
Check Answer
Challenge #2
Target: Sheet1!E2

Count the rows after the date that are also marked Done.

Example 3 - Count wildcard text plus another condition

Wildcards are useful when labels share a pattern but are not identical in every row. A rule like North* can include North East, North West, and similar entries without listing them one by one.

When you add another condition such as status, the count becomes much more targeted. Excel counts only the rows that match both the text pattern and the second rule.

=COUNTIFS(A1:A10,"North*",B1:B10,"High") // Counts matching North rows with High status.
Check Answer
Challenge #3
Target: Sheet1!E3

Count the North rows that also have High status.

Example 4 - Use cells for the criteria

In this setup, the conditions are stored in cells so the formula can be reused more easily. That means the same formula can answer different questions based on what is typed or selected in those filter cells.

This is a common dashboard pattern because it lets one count box update dynamically without editing the formula itself.

=COUNTIFS(A1:A10,D1,B1:B10,D2) // Uses D1 and D2 as the criteria.
Check Answer
Challenge #4
Target: Sheet1!E4

Count the rows that match the criteria stored in the cells.

Conclusion Recap

COUNTIFS is for moments when one condition is not enough. This lesson showed that the function checks several rules together and only counts a row when all of those rules are true at the same time.

The examples made that idea practical with categories, dates, wildcards, and cell-based filters. Once you remember that the ranges must line up and the logic is AND, COUNTIFS becomes a strong tool for more precise counting in reports and dashboards.

  • 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
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.