How to Use the COUNTIFS Function in Excel

The COUNTIFS function in Excel counts how many rows meet multiple conditions at the same time. It’s one of the most useful functions for analyzing data because it allows you to apply several criteria across different columns.

In This Guide, You’ll Learn

  • What the COUNTIFS function does
  • The syntax of COUNTIFS
  • How to count rows using multiple conditions
  • How to use comparison operators like greater than and less than
  • How to use text and date criteria
  • Common COUNTIFS mistakes and how to fix them
  • Real-world examples of COUNTIFS in Excel

What Does the COUNTIFS Function Do?

The COUNTIFS function counts the number of rows that meet multiple conditions.

Unlike COUNTIF, which handles only one condition, COUNTIFS allows you to test several conditions at once.

For example:

  • Count sales from the East region made by Sarah
  • Count products with inventory below 10 and status marked Active
  • Count orders above $500 placed in January

COUNTIFS only counts rows where ALL conditions are true.

COUNTIFS Function Syntax

Argument Definitions:

  • criteria_range1 — The first range to evaluate
  • criteria1 — The condition for the first range
  • criteria_range2 — The second range to evaluate
  • criteria2 — The condition for the second range

You can continue adding additional range/criteria pairs as needed.

Example Dataset Used in This Tutorial

You can download the sample data we’ll be using in this tutorial by clicking on this link—> COUNTIFS Function Data

Basic COUNTIFS Example

Imagine you have this sales table:

You want to count how many sales were made by Sarah in the East region.

Use:

Excel returns 2

Because Sarah appears twice in the East region.

How COUNTIFS Evaluates Multiple Conditions

COUNTIFS works using AND logic.

That means every condition must be true for a row to be counted.

For example:

This counts only rows where:

  • Region equals East
    AND
  • Status equals Completed

If only one condition matches, the row is not counted.

Using Greater Than or Less Than Conditions

COUNTIFS can also work with numeric comparisons.

For example, to count sales greater than 15000:

To count sales between 15000 and 20000:

This counts values that are:

  • Greater than or equal to 15000
    AND
  • Less than or equal to 20000

Using COUNTIFS with Text Conditions

COUNTIFS works extremely well with text data.

Example:

This counts rows where:

  • Region is East
    AND
  • Status is Approved

Text criteria are not case-sensitive.

For example:

  • “east”
  • “EAST”
  • “East”

All produce the same result.

Using COUNTIFS with Dates

COUNTIFS can also count rows based on dates.

Example:

This counts dates occurring during January 2026.

You can also combine date conditions with other criteria.

Example:

This counts January transactions from the East region.

Using Cell References in COUNTIFS

Instead of typing criteria directly into formulas, you can reference cells.

Example:

Where:

  • F1 contains East
  • F2 contains Approved

This makes spreadsheets easier to update dynamically.

Wildcards in COUNTIFS

COUNTIFS supports wildcards for partial text matching.

WildcardMeaning
*Any number of characters
?One character

Example:

Counts cells containing Smith anywhere in the text.

Example:

Matches:

  • Jan
  • Jon
  • Jen

But not:

  • John

Common COUNTIFS Errors

Ranges Are Different Sizes

This causes errors:

All criteria ranges must contain the same number of rows.

Forgetting Comparison Operators in Quotes

Incorrect:

Correct:

Comparison operators must be inside quotation marks.

Counting Numbers Stored as Text

If numbers are stored as text, COUNTIFS may not evaluate them correctly.

You may need to:

  • Convert values to numbers
  • Remove apostrophes
  • Use the VALUE function cleanup methods

COUNTIFS vs COUNTIF

FunctionPurpose
COUNTIFCounts using one condition
COUNTIFSCounts using multiple conditions

Example:

COUNTIF:

COUNTIFS:

COUNTIFS is more powerful when analyzing complex datasets.

Example Dataset Used in This Tutorial

You can download the sample data we’ll be using in this tutorial by clicking on this link—> COUNTIFS Function Data

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *