SheetRocks
Documentation/Formulas/SUMIF

SUMIF

Returns the sum of a range depending on criteria

Syntax

SUMIF(range, criteria, [sum_range])

Arguments

Argument Description Required
range The range which is to be tested against criteria Required
criteria The criteria to be tested against each element of range Required
sum_range The actual cells to sum. If missing, the 2nd argument is summed. Optional

Examples

Sum values greater than 10

=SUMIF(A1:A5, CELL > 10)
Result ⇒ 60
A
1 5
2 15
3 20
4 8
5 25

Sum with separate criteria and sum ranges

=SUMIF(A1:A3, COL[1] = "Product A", B1:B3)
Result ⇒ 250
A B
1 Product A 100
2 Product B 200
3 Product A 150

Sum based on text criteria

=SUMIF(A1:A3, COL[1] = "North", B1:B3)
Result ⇒ 1800
A B
1 North 1000
2 South 1500
3 North 800

Related Functions

Other Statistical functions:


← Back to Formula Reference