Skip to main content
Back to Blog
Excel TipsFormulasData Analysis

How to Use COUNTIFS in Excel (With Examples)

Desk Dojo··3 min read

Introduction

The COUNTIFS function counts cells that meet multiple conditions. It works like COUNTIF but allows you to apply more than one rule at the same time, which makes it useful for tasks like filtering financial data or reviewing survey responses. By using COUNTIFS, you can handle more complex criteria without needing extra formulas.

Example: How to Use COUNTIFS in Excel

Let's dive into a practical example to illustrate how COUNTIFS works.

Imagine you have a dataset containing information about product sales in different regions.

Sample sales data table

Now, suppose you want to find out how many times Gum was sold in the West region. This is where COUNTIFS can be useful.

Syntax of COUNTIFS

The syntax is:

=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)
  • criteria_range1: The range of cells to evaluate against criteria1.
  • criteria1: The condition to be met in criteria_range1.
  • [criteria_range2, criteria2]: Additional ranges and criteria to apply (optional).

Applying COUNTIFS to Our Example

In our case, the formula would look like this:

=COUNTIFS(B4:B8, "West", C4:C8, "Gum")

COUNTIFS formula for West and Gum

Here's how it breaks down: The formula counts the number of occurrences where both "West" appears in the Region column and "Gum" appears in the Product column.

  • B4:B8: This is the range where we check for "West" in the Region column.
  • "West": The criteria that must be met in the Region column.
  • C4:C8: This is the range where we check for "Gum" in the Product column.
  • "Gum": The criteria that must be met in the Product column.

Since "West" and "Gum" appear in the same row together twice, the answer will show 2.

COUNTIFS result showing 2

Why Use COUNTIFS?

COUNTIFS is helpful when you need to count data that meets more than one condition at the same time.

  • Handles multiple criteria: You can include several ranges and conditions in a single formula.
  • Works across many situations: Useful for sales reports, survey results, or any dataset where you need to filter by more than one rule.
  • Saves time: Instead of sorting or filtering data manually, COUNTIFS gives you the result directly.

Conclusion

COUNTIFS is a practical tool for working with complex datasets and helps you get answers more quickly and reliably.

If you're working with single-condition calculations, check out our guide on COUNTIF and SUMIF for simpler conditional formulas. For multi-criteria calculations that go beyond counting, see our guide on SUMPRODUCT.

Level up your Excel skills

Bite-sized lessons, drills, and daily challenges to build real spreadsheet skills.