0Pricing
Excel Formulas Academy · Lesson

Counting Across Conditions With COUNTIFS

Count rows that satisfy multiple criteria simultaneously.

Counting Across Conditions With COUNTIFS is a free Excel Formulas Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Excel Formulas Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Counting With Multiple Rules

COUNTIFS counts how many rows satisfy several conditions at the same time. Where COUNTIF answers "how many sales were in the East?", COUNTIFS answers "how many East sales happened in January?"

It doesn't add or average anything — it simply tallies the rows that pass every test. That makes it perfect for questions like "how many orders over $100 came from new customers?"

Let's learn its structure and put it to work.

The COUNTIFS Structure

COUNTIFS has no sum_range, because it isn't adding values — it only needs the ranges to test and the criteria to test them against.

  • criteria_range1, criteria1 — the first test
  • criteria_range2, criteria2 — the second test
  • ...and so on, up to 127 pairs

Every argument comes in a tidy range, criteria pair. The result is a single whole number: the count of rows where all conditions are true.

=COUNTIFS(criteria_range1, criteria1, criteria_range2, criteria2)

A Worked Example

Using the same sales table — column A is Region, column B is Month, column C is Amount — let's count how many sales were East and in January.

There's no amount column in this formula because we're counting rows, not summing money. Each pair narrows the tally further.

=COUNTIFS(A:A, "East", B:B, "January")

Counting With Number Comparisons

Just like SUMIFS, COUNTIFS accepts comparison operators inside quotes for numeric tests.

  • ">100" — values above 100
  • ">=18" — 18 or older
  • "<>" — any non-empty cell

Here we count East region rows where the amount is greater than 100. Notice the amount column appears as a criteria_range, not a sum_range.

=COUNTIFS(A:A, "East", C:C, ">100")

Counting a Numeric Range (Between)

A common need is counting values that fall between two numbers. You can't do this with one criterion — you give the same column twice with a lower and an upper bound.

This counts amounts that are at least 50 and at most 200. Both conditions point at column C, and because COUNTIFS uses AND logic, only rows inside the band are counted.

=COUNTIFS(C:C, ">=50", C:C, "<=200")

Comparing Against Cells

To make the bounds dynamic, store them in cells and join the operator with &. Put the low value in F1 and the high value in F2.

">="&F1 builds greater than or equal to F1. This lets a user type new limits and instantly see the updated count without editing the formula itself.

=COUNTIFS(C:C, ">="&F1, C:C, "<="&F2)

Counting Non-Blank and Blank Cells

Two special criteria are useful for data quality checks:

  • "<>" counts cells that are not empty
  • "=" or "" counts cells that are empty

This formula counts how many East region rows have a salesperson filled in (column D not blank) — a quick way to spot missing data.

=COUNTIFS(A:A, "East", D:D, "<>")

Wildcards in COUNTIFS

Text criteria support the same wildcards as SUMIFS. Use * for any run of characters and ? for a single character.

This counts every row whose salesperson name starts with the letter M — Maria, Mike, Mohammed all match. Wildcards only affect text; they're ignored against numbers.

=COUNTIFS(D:D, "M*")

Keep Ranges the Same Size

The same dimension rule from SUMIFS applies: every criteria_range must be the same shape. If one range is A2:A100 and another is B2:B50, COUNTIFS returns a #VALUE! error.

Whole-column references like A:A and B:B are automatically the same size, which is why they're a popular, error-proof choice for criteria ranges.

=COUNTIFS(A2:A100, "East", B2:B100, "January")

A Practical Summary Table

COUNTIFS is the engine behind many dashboards. Lay region names down column F and month names across row 1, then count each combination with mixed references so the formula fills the whole grid.

Locking the columns with $A:$A and the lookup cells with $F2 / G$1 lets one formula populate an entire cross-tab of counts when copied.

=COUNTIFS($A:$A, $F2, $B:$B, G$1)

COUNTIFS vs COUNTIF

Keep the family straight. COUNTIF takes a single range, criteria pair, while COUNTIFS takes one or more pairs. Unlike SUMIFS, neither has a separate result range — both simply count.

If you ever need more than one condition, reach for COUNTIFS. Many people use COUNTIFS even for a single test so they only have to remember one consistent pattern across SUM, COUNT, and AVERAGE.

=COUNTIFS(A:A, "East")

Quick Check

Think about how COUNTIFS differs from SUMIFS.

Recap: COUNTIFS

You can now tally rows across many conditions:

  • COUNTIFS(range1, crit1, range2, crit2, ...) — no sum_range, just test pairs.
  • Count a between range by repeating the same column with two bounds.
  • Use "<>" for non-blank and join with & for cell-based limits.
  • All ranges must be the same size.

Next: averaging values across multiple conditions with AVERAGEIFS.

=COUNTIFS(A:A, F1, C:C, ">="&F2, D:D, "<>")

Frequently asked questions

Is the “Counting Across Conditions With COUNTIFS” lesson free?

Yes — the full text of “Counting Across Conditions With COUNTIFS” is free to read here on the web, and the Excel Formulas Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Excel Formulas Academy course, upgrade to CoddyKit PRO.

What will I learn in “Counting Across Conditions With COUNTIFS”?

Count rows that satisfy multiple criteria simultaneously. You practise Excel Formulas Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Excel Formulas Academy?

No prior experience is required. Excel Formulas Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Counting Across Conditions With COUNTIFS” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Excel Formulas Academy lesson?

Yes. Every Excel Formulas Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Summing Across Conditions With SUMIFS
  2. Counting Across Conditions With COUNTIFS
  3. Averaging Across Conditions With AVERAGEIFS
  4. Date Ranges in Criteria Functions
← Back to Excel Formulas Academy