Excel Function

SUMIF

Sums values that meet a condition.

SUMIF(range, criteria, [sum_range])

Arguments

range

Required

Specify the range used for condition check or aggregation.

criteria

Required

Enter the match condition, e.g. "Food", ">=80", "<>0".

sum_range

Optional

Specify the range of values to sum.

Practice Preview

Use SUMIF to aggregate Sales in column D where Category matches Food. You can set ranges by dragging from the start cell to the end cell in the same argument field.

Example Table

#
AProduct ID
BProduct Name
CCategory
DSales
2P001AppleFood1200
3P002BananaFood980
4P003NotebookStationery450
5P004PenStationery300
6P005GrapesFood1500
7P006RulerStationery250
8P007PeachFood860

How to Use (Formula)

=SUMIF(C2:C8, "Food", D2:D8)

Result

4540

Practice This Function

SUMIF FAQ

How do I use SUMIF in Excel?

Use SUMIF when you want to sum only the values that match a condition. Enter Range, Criteria, Sum range in that order, then add optional arguments when needed.

Where can I practice SUMIF?

Use the "Start Function Practice" button to jump straight into SUMIF drills.

What arguments does SUMIF use?

The main arguments are Range, Criteria, Sum range. Start with the required ones, then add optional arguments if needed.