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
| Row | A | B |
|---|---|---|
| 1 | Status | Amount |
| 2 | Paid | 1,200 |
| 3 | Unpaid | 800 |
| 4 | Unpaid | 450 |
| 5 | ||
| 6 | Unpaid 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.