SUMIFS Function

Excel Functions › Math & Trig

Excel 2007+ Math & Trig

The Excel SUMIFS function adds the cells that meet every condition you give it — multiple AND criteria across as many columns as you need.


Quick answer:
=SUMIFS(C2:C6,A2:A6,"x",B2:B6,">5") sums C where A is x AND B > 5

Syntax

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
ArgumentDescription
sum_rangeRequiredThe cells to add. Unlike SUMIF, this comes first.
criteria_range1RequiredThe first range to test.
criteria1RequiredThe condition applied to criteria_range1.
criteria_range2, criteria2, ...OptionalUp to 127 additional range/criteria pairs. All conditions must be met (logical AND).

How to use it

SUMIFS flips the SUMIF order: the sum range comes first, then one or more range, criteria pairs. A row is added only when it satisfies all conditions.

=SUMIFS(C2:C6, A2:A6, "x", B2:B6, ">5") // A=x AND B>5
=SUMIFS(C2:C6, A2:A6, "East", B2:B6, ">="&F1) // region East AND B >= F1

Every criteria range must be the same size as sum_range. Criteria follow the same rules as SUMIF: quote operators and text, use & to reference cells, and use */? wildcards.

Date ranges: to sum between two dates, use two conditions on the same column — ">="&startdate and "<="&enddate.

Try it: interactive demo

Live demo

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

Result:

Practice workbook

📊
Download the free SUMIFS 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

Why does SUMIFS put the sum range first?
Because it accepts many criteria pairs, the range to total has to come first so Excel knows where the pairs begin. SUMIF, with only one criterion, puts the sum range last.
Does SUMIFS use AND or OR logic?
AND — a row is summed only if it meets every condition. For OR logic, add several SUMIFS together or use SUMPRODUCT.
How do I sum between two dates?
Put two conditions on the date column: =SUMIFS(C2:C6,D2:D6,">="&G1,D2:D6,"<="&G2) sums rows whose date falls between G1 and G2.
Why does SUMIFS return a #VALUE! error?
Most often the ranges aren't all the same size, or a criteria range and the sum range have different dimensions. Make sure every range spans the same rows.

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: SUMIF · SUM · COUNTIFS · AVERAGEIFS · SUMPRODUCT