Skip to main content
Albero Academy

Conditional Aggregation

Summarise data by criteria — SUMIF/SUMIFS, COUNTIF/COUNTIFS and AVERAGEIFS, with multiple conditions and wildcards.

Chapter 11Excel14 min readBeginner friendly
  • #Excel
  • #SUMIFS
  • #COUNTIFS

Plain SUM totals everything; conditional aggregation totals only the rows that match criteria — "sales in the North region", "students who passed". The …IFS functions are the analyst's workhorse for turning a raw table into a summary without a pivot table.

Why conditional aggregation?

It answers "how much / how many, for rows matching X?" directly in a formula — perfect for dashboards where the numbers need to update live as the underlying data changes.

SUMIF & COUNTIF

one criterion
=SUMIF(region, "North", sales) total sales where region = North
=COUNTIF(status, "Placed") how many rows say "Placed"
=AVERAGEIF(programme, "Data", package) average package for Data students
Structure: =SUMIF(range-to-test, criterion, range-to-sum)

SUMIFS & COUNTIFS

The plural …IFS versions take multiple criteria (all must be true). Note the argument order flips — SUMIFS puts the sum range first:

multiple criteria
=SUMIFS(sales, region, "North", month, "Jan")
sum-range test1 crit1 test2 crit2
=COUNTIFS(programme, "Data", placed, TRUE)
=AVERAGEIFS(package, programme, "Data", year, 2026)

Operators & wildcards

ranges, comparisons & partial matches
=SUMIFS(sales, amount, ">1000") greater than
=COUNTIFS(package, ">=6", package, "<=9") a range (6–9)
=SUMIFS(sales, date, ">="&A1) compare to a cell (& to join)
=COUNTIF(name, "A*") starts with A (* = any text)
=COUNTIF(code, "D?2*") ? = one character

Practice

From a sales table, compute total sales for one region (SUMIF), then sales for that region in a specific month (SUMIFS). Count how many students both did "Data" and got placed (COUNTIFS), and total sales above ₹1000 using a comparison operator.

Key takeaways

  1. 01Conditional aggregation summarises only rows matching criteria — live, formula-based reporting.
  2. 02SUMIF/COUNTIF/AVERAGEIF take one criterion; the …IFS versions take several (all must match).
  3. 03SUMIF is (range, criterion, sum-range) but SUMIFS is (sum-range, range, criterion, …) — order flips.
  4. 04Use comparison operators in quotes (">1000") and & to join to a cell (">="&A1).
  5. 05Wildcards: * = any text, ? = one character, for partial matches.