ExcelUnpackUnpack Excel, one formula at a time.
Log inSign up

Lesson 23 · Conditional sums

SUMIFS and COUNTIFS in Excel

SUMIFS adds up the rows that match several conditions. Watch the order: the numbers to add come first, then each pair of where to look and what to look for.

Practice this lesson →Pro lesson. The first 4 lessons are free.

What you will learn

  • Check more than one thing at once
  • Put the parts in the right order

How it works

The functions that end in S can check many things. A row must match all of them.

Watch the order! SUMIFS puts the numbers to add up first. Then come pairs: where to look, what to look for.

Formulas at a glance

=SUMIFS(sum_range, range1, crit1, range2, crit2)The pattern to follow
=COUNTIFS(range1, crit1, range2, crit2)The pattern to follow

Example

Write the formula to add up the West orders that have shipped.

ABCDEFG
1OrderRegionAmountStatusQuestionAnswer
21001West$820.00ShippedWest + Shipped total
31002East$240.00PendingEast orders ≥ 300
41003North$510.00ShippedPending total over 300
51004West$130.00ShippedEast + Shipped total
61005South$975.00PendingWest orders under 500
71006East$660.00Shipped
81007West$390.00Pending

Click G2 and type =SUMIFS(C2:C9,B2:B9,"West",D2:D9,"Shipped"), then press Enter.

The answer is $950.00.

When to use it

  • Total East sales that shipped
  • Spending on wants in one month
  • Any total with two or more conditions

Common mistakes

  • Putting the sum range last, like in SUMIFIn SUMIFS the sum range comes first.
  • Ranges of different sizesEvery range must cover the same rows.
  • Expecting ORAll conditions must match. For OR, add two SUMIFS.

Quick check

In SUMIFS, what comes first?

  1. What to look for
  2. The numbers to add up
  3. Where to look
  4. It doesn't matter
Show the answer

B. The numbers to add up The numbers to add up always go first.

Practice it on a real sheet

Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.

SUMIFS and COUNTIFS in Excel: how it works, with examples · ExcelUnpack