FormulaCamp
Completed
← All functions
Math

SUMIFS

Sum with several conditions.

Syntax

SUMIFS(sum_range, criteria_range1, criteria1, …)

Example: =SUMIFS(C:C,A:A,"Boston",B:B,">100")

Available in: All versions

SUMIFS adds up the cells that meet all of several conditions: =SUMIFS(sum_range, criteria_range1, criteria1, …). Use it for totals such as sales for one region above a size, or expenses for a category within a date range.

When to use it

Arguments explained

Worked examples

Two conditions

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =SUMIFS(C2:C7,A2:A7,"East",B2:B7,"Ana")

Result: 1810

Sums Amount only where Region is East and Rep is Ana: 1200 + 610.

Exclude a region, with a minimum

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =SUMIFS(C2:C7,A2:A7,"<>North",C2:C7,">=600")

Result: 4160

"<>North" excludes the North rows; ">=600" drops small amounts: 1200 + 850 + 1500 + 610.

Between two values

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =SUMIFS(C2:C7,C2:C7,">500",C2:C7,"<1000")

Result: 2430

The same range can appear twice to build a lower and an upper bound: 850 + 970 + 610.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =SUMIFS(C2:C7,A2:A7,"East",B2:B7,"Lamp")

Example spreadsheet for SUMIFS
ABCDEF
1RegionProductUnitsPriceResult
2EastPen1202.515
3WestPen802.5
4EastBook4512
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: 15
Practice this in a lesson: Multiple Conditions

Common errors and how to fix them

Related functions

Frequently asked questions

How many criteria can SUMIFS take?
Up to 127 range and criteria pairs.
How do I sum between two dates?
Use two criteria on the date column: ">="&start_date and "<="&end_date.
Does SUMIFS work across sheets?
Yes, but all ranges must be the same size, and closed workbooks are not supported by references to other files.
Why is SUMIFS slow?
Whole-column references over huge data can be slow. Use exact ranges or an Excel Table.

Practice

More in Math