DeskFluent
Module 2 Pro8 min read

SUMIFS and COUNTIFS: totals with conditions

"Total sales in Mumbai in March for product B" — in one formula.

Lookups answer "find me this row". Managers rarely ask that. They ask things like: "What did we sell in Mumbai, in March, for product B?" — a total across many rows, but only the rows that qualify.

Back in Module 1 you met COUNTIF, which counted cells passing one test. This lesson gives you the plural versions — SUMIFS and COUNTIFS — which handle as many tests as you like. This pair, plus the lookups you now know, covers most of what an analyst does before lunch.

The data

Rahul's shop has grown again. His sales sheet:

ABCD
1DateCityProductAmount
203-MarMumbaiPen150
305-MarDelhiBag850
409-MarMumbaiBag1700
511-AprMumbaiPen300

...and 500 more rows below.

SUMIFS — the shape

=SUMIFS(D2:D500, B2:B500, "Mumbai")

Read it aloud: "Add up the Amounts, but only where the City is Mumbai."

The order matters and trips people up, so say it once and remember it: the numbers you want to add come FIRST. After that, conditions arrive in pairs — a range, then what that range must equal.

Keep reading with Pro

You are reading the free preview. Module 1 of every course is free forever — Pro unlocks the rest of this lesson, every other module of every course, removes ads, and adds workbooks and certificates.