Math and trigonometry

SUMIF

Add amounts for rows that match one rule.

Syntax

=SUMIF(range, criteria, [sum_range])

Worked example

Put East, West, East in A2:A4 and 10, 40, 15 in B2:B4. Total only the East rows.

=SUMIF(A2:A4,"East",B2:B4)

Result 25

Microsoft documentation

Check the arguments, supported editions and behavior of this function in Microsoft’s reference.

Microsoft reference

Search ExcelTutor