Math formula

SUMIF in Excel and Google Sheets

Add up numbers that meet a single condition.

Syntax

=SUMIF(range, criteria, [sum_range])
range
The cells to test.
criteria
The condition.
sum_range
The numbers to add. If left out, range is added.

Example

SUMIF example
RowAB
1StatusAmount
2Paid1,200
3Unpaid800
4Unpaid450
5
6Unpaid total

B6 =SUMIF(A2:A4,"Unpaid",B2:B4)

Result: 1250

Adds the amounts where the status is Unpaid.

Ready-to-copy formulas

  • Sum values above 1000

    =SUMIF(B:B,">1000")
  • Sum where text contains a word

    =SUMIF(A:A,"*ads*",B:B)

Tips

  • Use * as a wildcard for "contains".
  • For more than one condition use SUMIFS.

Need the whole spreadsheet?

Start from a free template with every formula already in place. Opening a template uses no credits.