SUMIF Function

Excel Functions › Math & Trig

All versions Math & Trig

The Excel SUMIF function adds the numbers in a range that meet a single condition — for example, every order over $100, or every row tagged “apples.”


Quick answer:
=SUMIF(A2:A6,">10") adds the values in A2:A6 that are greater than 10

Syntax

=SUMIF(range, criteria, [sum_range])
ArgumentDescription
rangeRequiredThe cells tested against the criteria.
criteriaRequiredThe condition, e.g. ">10", "apples", or a cell reference. Supports the wildcards * and ?.
sum_rangeOptionalThe cells to add. If omitted, SUMIF adds the cells in range itself.

How to use it

SUMIF tests one range and adds matching numbers. Leave off sum_range to add the tested cells themselves, or supply it to add a different column.

=SUMIF(A2:A6, ">10") // sum values in A2:A6 over 10
=SUMIF(B2:B6, "apples", C2:C6) // sum C where B = apples
=SUMIF(B2:B6, "*berry", C2:C6) // wildcard: blueberry, etc.

Wrap operators and text in double quotes. To compare against a cell, concatenate with &, e.g. ">"&E1. For two or more conditions, step up to SUMIFS.

Same shape: range and sum_range should be the same size and orientation. If sum_range is shorter, Excel extends it to match the test range, which can silently include the wrong cells.

Try it: interactive demo

Live demo

Pick a SUMIF example to see the formula and its result.

Result:

Practice workbook

📊
Download the free SUMIF practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What is the difference between SUMIF and SUMIFS?
SUMIF tests a single condition; SUMIFS tests multiple conditions (and puts the sum range first). For one criterion either works; for two or more you need SUMIFS.
Can SUMIF use wildcards?
Yes. * matches any number of characters and ? matches a single character — so "app*" matches apple and apples. To match a literal * or ?, precede it with a tilde (~*).
How do I compare against a cell value in SUMIF?
Build the criteria with the & operator: =SUMIF(A2:A6,">"&E1) sums values greater than whatever is in E1.
Why does SUMIF return 0?
Usually the criteria don't match (check for stray spaces or numbers stored as text) or sum_range points at non-numeric cells. Confirm the test column and the sum column line up row-for-row.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: SUMIFS · SUM · COUNTIF · AVERAGEIF · SUMPRODUCT