Back to functions
Math & Trig2026-03-142 related articles

SUMIF Function in Excel

Add values that meet a single condition.

Syntax

SUMIF(range, criteria, [sum_range])

Arguments

range

Required

The cells to evaluate against the condition.

criteria

Required

The condition that determines which cells qualify.

sum_range

Optional

The cells to add when the condition is met. If omitted, Excel sums the cells in range.

What it returns

Returns the sum of values that satisfy one condition.

What SUMIF does

SUMIF adds values that match one condition. It is a useful step up from SUM when you need totals for a subset such as one category, one customer, one month, or one region.

Practical examples

Sum sales for one category

=SUMIF($A$2:$A$20,"Hardware",$B$2:$B$20)

Excel checks the labels in column A and adds the matching amounts from column B.

Use a cell as the condition

=SUMIF($A$2:$A$20,E2,$B$2:$B$20)

This makes the formula reusable because the criteria can change without rewriting it.

Common mistakes and notes

SUMIF handles one condition

If you need multiple conditions, use SUMIFS.

Criteria syntax matters

Text criteria usually go in quotes. Operators such as ">100" also belong inside quotes unless they are joined with a cell reference.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use SUMIF.

Official documentation