SUMIF Function
Adds up the cells that meet one condition.
Category
Math & Trig
Available in
All versions, Microsoft 365
Returns
A number
Overview
SUMIF totals only the rows that match a condition — all sales in the West, every expense over $1,000, everything before a date.
For two or more conditions, use SUMIFS.
Syntax
=SUMIF(range, criteria, [sum_range])
Arguments
| Argument | Required? | What it does |
|---|---|---|
| range | Yes | The cells to test against the condition. |
| criteria | Yes | The condition, such as "West", ">1000" or a cell like F2. |
| sum_range | Optional | The cells to add. Leave it out to add the tested cells themselves. |
Examples
Example 1 — Sales for one region
Total the West region's orders.
E2fx=SUMIF(B2:B6, "West", C2:C6)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Sales | West total | |
| 2 | Ana | West | 620 | 1550 | |
| 3 | Ben | East | 480 | ||
| 4 | Cara | West | 500 | ||
| 5 | Dev | North | 350 | ||
| 6 | Eli | West | 430 |
=SUMIF(B2:B6, "West", C2:C6) Explain
Example 2 — Only the big orders
Add every sale of 500 or more. The tested cells and the summed cells are the same, so sum_range is left out.
C2fx=SUMIF(B2:B5, ">=500")
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Sales | 500+ total |
| 2 | Ana | 620 | 1120 |
| 3 | Ben | 480 | |
| 4 | Cara | 500 | |
| 5 | Dev | 350 |
=SUMIF(B2:B5, ">=500") Explain
Example 3 — Condition in a cell
Join the operator and the cell with &.
=SUMIF(B2:B6, ">="&F1, C2:C6) Explain
Common mistakes
- Operators go inside quotes. Write ">=500", not >=500. With a cell, join them: ">="&F1.
- Ranges of different sizes. range and sum_range should be the same size; otherwise Excel quietly reshapes sum_range and totals can be wrong.
Notes
- Criteria aren't case-sensitive and accept wildcards: "N*" matches North and Northeast.
- Related functions: SUMIFS, COUNTIF, AVERAGEIF.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.