Excel functions / Maths & statistics

SUMIF

Adds up the values that meet one condition.

Syntax=SUMIF(range, criteria, [sum_range])

Arguments

rangeThe cells to test.
criteriaThe condition, such as "East", ">100" or a cell reference.
sum_rangeOptional. The cells to add. Leave it out to add the tested cells themselves.

How it works

SUMIF answers questions such as "what are the total sales for the East region?" It checks each cell in the range and adds the matching values.

Conditions with comparison signs go in quotes: ">100". To compare against a cell, join them with &: ">"&E1.

Example

E2=SUMIF(A2:A5,"East",C2:C5)
ABCDE
1RegionRepSales
2EastAna500750
3WestBen300
4EastCal250
5WestDee700
6

Result: 750. Adds the sales for the two East rows: 500 + 250.

Tips

Practise SUMIF

Try it yourself in a real spreadsheet, with instant feedback on every answer.

Start the exercise

Related