# SUMIF function in Excel

> SUMIF adds up values for the rows that meet one condition: total travel expenses, revenue for one product, every invoice over $500.

Source: https://spreadsheetpractice.com/functions/sumif · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** SUMIF adds up values for the rows that meet one condition: total travel expenses, revenue for one product, every invoice over $500.
- **Syntax:** `=SUMIF(range, criteria, [sum_range])`
- **Most common use:** `=SUMIF(B2:B8,"Travel",C2:C8)` returns $2,030 (Checks column B, adds the matching amounts from C)
- **Available in:** Every current version
- **Category:** [Conditional sum and count functions](https://spreadsheetpractice.com/functions/category/conditional)
- **Returns:** The total of the matching values, or 0 if nothing matches.
- **Google Sheets:** Also available in Google Sheets.

## What it does

SUMIF adds up values for the rows that meet one condition: total travel expenses, revenue for one product, every invoice over $500. It checks one range and adds the matching cells from another. If you leave out the sum range, it adds the checked cells themselves.

## Syntax

`=SUMIF(range, criteria, [sum_range])`

| Argument | Required? | What it is |
|---|---|---|
| `range` | Required | The cells to check against the condition. |
| `criteria` | Required | The condition, such as "Travel", ">500" or a cell reference. |
| `sum_range` | Optional | The cells to add. If omitted, SUMIF adds the cells in range. |

## Examples

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| F2 | `=SUMIF(B2:B8,"Travel",C2:C8)` | $2,030 | Checks column B, adds the matching amounts from C |
| F3 | `=SUMIF(C2:C8,">500")` | $2,820 | No sum range: adds the checked cells themselves |
| F4 | `=SUMIF(B2:B8,"<>Travel",C2:C8)` | $1,577 | "<>" means "not equal to" |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Date | Category | Amount |  | Check | Result |
| 2 | 4/2/2026 | Travel | $640 |  | Travel total | $2,030 |
| 3 | 4/3/2026 | Meals | $85 |  | Items over $500 | $2,820 |
| 4 | 4/7/2026 | Software | $1,200 |  | Everything but travel | $1,577 |
| 5 | 4/9/2026 | Travel | $410 |  |  |  |
| 6 | 4/14/2026 | Meals | $62 |  |  |  |
| 7 | 4/18/2026 | Travel | $980 |  |  |  |
| 8 | 4/22/2026 | Office | $230 |  |  |  |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| The total is 0 | Usually a mismatch: extra spaces, a typo in the criterion, or numbers stored as text in the sum range. |
| Mixing up the argument order with SUMIFS | SUMIF puts the sum range last; SUMIFS puts it first. Many people use SUMIFS everywhere to avoid the switch. |
| Totals are wrong after filling down | Lock the ranges with $ and point the criterion at the cell in each row. |

## Tips

- Put each category in a cell and use =SUMIF($B$2:$B$8,E2,$C$2:$C$8) to build a summary table you can fill down.

## Related functions

- [SUMIFS](https://spreadsheetpractice.com/functions/sumifs): SUMIFS adds the values where every condition is true: East region widget sales, February revenue, large orders from one customer.
- [COUNTIF](https://spreadsheetpractice.com/functions/countif): COUNTIF counts the cells in a range that meet one condition: tickets marked "Open", scores of 70 or more, product names containing "lamp".
- [AVERAGEIF](https://spreadsheetpractice.com/functions/averageif): AVERAGEIF averages only the values that meet one condition: the average order from one region, response times for chat tickets, scores above zero.
- [SUM](https://spreadsheetpractice.com/functions/sum): SUM adds numbers.
- Comparison: [SUMIF vs SUMIFS](https://spreadsheetpractice.com/functions/compare/sumif-vs-sumifs)

## Questions

### How do I sum based on text in another column?

Use =SUMIF(B2:B8,"Travel",C2:C8): check column B, add from column C.

### How do I sum values greater than a number?

Use =SUMIF(C2:C8,">500"). The comparison goes in quotes.

### What is the difference between SUMIF and SUMIFS?

SUMIF handles one condition with the sum range last. SUMIFS handles one or more conditions with the sum range first.

## Practice

A graded SUMIF exercise ("Sum by region") is on [the SUMIF page](https://spreadsheetpractice.com/functions/sumif). It is checked instantly, then re-checked on changed data.

Lessons that use SUMIF:

- [Lesson 7: COUNTIF & SUMIF](https://spreadsheetpractice.com/learn/countif-sumif)
- [Lesson 32: Self-building summary tables](https://spreadsheetpractice.com/learn/summary-tables-unique-sumifs) (Pro)

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
