BBampaa

Lessons › Excel & Google Sheets

Excel & Google Sheets lesson

SUMIF

It looks down the Location column, and wherever it finds Lagos, adds that row's revenue: 264.

Try this lesson free →
About 5–10 minutes · no sign-up needed

Example

SUMIF checks one column and adds up another:

=SUMIF(C2:C9,"Lagos",F2:F9)

Typed into cell I2 of this sheet:

OrderDayLocationProductQtyRevenueReportAnswer
O101MonLagosEarbuds270Lagos revenue
O102MonAbujaCharger115Earbuds revenue
O103TueLagosPhone case324Abuja revenue
O104WedLagosEarbuds135Chargers sold
O105WedAbujaEarbuds4140Phone case revenue
O106ThuLagosCharger230Wednesday revenue
O107FriAbujaPhone case540
O108FriLagosEarbuds3105

Key points

C2:C9First, the range to check: the Location column.
"Lagos"Second, what to look for.
F2:F9Last, the range to add up: Revenue.

Put together: =SUMIF(C2:C9,"Lagos",F2:F9).

Practice

Try each one in your head first, then open the answer.

1. In I3, total the revenue from Earbuds.
=SUMIF(D2:D9,"Earbuds",F2:F9)
2. In I4, total the revenue from Abuja.
=SUMIF(C2:C9,"Abuja",F2:F9)
3. In I5, total how many Chargers were sold. Add up the Qty column this time.
=SUMIF(D2:D9,"Charger",E2:E9)
4. In I6, total the revenue from Phone cases.
=SUMIF(D2:D9,"Phone case",F2:F9)
5. In I7, total the revenue from Wednesday's orders. The days are in column B, written short, so Wednesday is "Wed".
=SUMIF(B2:B9,"Wed",F2:F9)

Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.

Try this lesson free →
About 5–10 minutes · no sign-up needed