How to Use SUMIFS in Excel

Excel's SUM function adds everything. SUMIF adds values meeting one condition. SUMIFS handles the reality of business data: you need to sum values that meet multiple conditions simultaneously.

Key Insights

  • SUMIFS allows you to sum values based on multiple conditions simultaneously, unlike SUMIF which handles only one criterion—essential for real-world data analysis where single-condition filtering is rarely sufficient
  • The syntax places the sum range first (opposite of SUMIF), which trips up many users but enables unlimited criteria pairs: =SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, ...)
  • Always ensure your sum range and criteria ranges have identical dimensions, or Excel will throw a #VALUE! error—this is the most common mistake that derails SUMIFS formulas

Understanding When You Need SUMIFS

Excel’s SUM function adds everything. SUMIF adds values meeting one condition. SUMIFS handles the reality of business data: you need to sum values that meet multiple conditions simultaneously.

Consider a sales database. You don’t just want total sales—you want sales for a specific product, in a specific region, during a specific time period. That’s where SUMIFS becomes indispensable. While you could nest multiple SUMIF functions or use array formulas, SUMIFS provides a clean, readable solution.

The key difference from SUMIF: argument order. SUMIF puts the range to sum second (=SUMIF(criteria_range, criteria, sum_range)), while SUMIFS puts it first. This change accommodates multiple criteria pairs without ambiguity.

SUMIFS Syntax Breakdown

The SUMIFS structure follows this pattern:

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

sum_range: The cells containing values you want to add. This must be a contiguous range of numbers.

criteria_range1: The first range to evaluate against a condition. Must have the same dimensions as sum_range.

criteria1: The condition that criteria_range1 must meet. Can be a number, text, cell reference, or expression like “>100”.

criteria_range2, criteria2 (optional): Additional range-condition pairs. You can add up to 127 criteria pairs, though practical limits are much lower for readability.

Critical rule: All ranges must have identical dimensions. If sum_range is D2:D100, every criteria_range must also span 99 rows.

Single Criteria Example

Let’s start with a basic sales dataset:

A B C D
Order ID Category Region Amount
1001 Electronics East 1500
1002 Furniture West 800
1003 Electronics East 2200
1004 Office East 350

To sum all Electronics sales:

=SUMIFS(D2:D20, B2:B20, "Electronics")

This formula sums values in D2:D20 where the corresponding B column cell equals “Electronics”. The result would be 3700 (1500 + 2200).

You could accomplish this with SUMIF, but using SUMIFS maintains consistency when you inevitably need to add more criteria.

Multiple Criteria in Action

Real analysis requires combining conditions. Here’s where SUMIFS shines.

Two criteria - Sum Electronics sales in the East region:

=SUMIFS(D2:D20, B2:B20, "Electronics", C2:C20, "East")

This evaluates both conditions simultaneously. Only rows where B=“Electronics” AND C=“East” contribute to the sum.

Three criteria - Add a minimum threshold:

=SUMIFS(D2:D20, B2:B20, "Electronics", C2:C20, "East", D2:D20, ">1000")

Now we’re summing Electronics sales in the East region that exceed $1000. Notice that D2:D20 appears twice—once as the sum_range and once as a criteria_range. This is valid and common.

Using wildcards for partial matches:

=SUMIFS(D2:D20, C2:C20, "North*", B2:B20, "Electronics")

The asterisk wildcard matches “North”, “Northeast”, “Northwest”, etc. The question mark (?) matches any single character. Wildcards only work with text criteria.

Advanced Techniques for Dynamic Analysis

Hardcoded criteria like “Electronics” create brittle formulas. Use cell references for flexibility.

Dynamic criteria with cell references:

Assume G2 contains “Electronics” and H2 contains “East”:

=SUMIFS($D$2:$D$20, $B$2:$B$20, G2, $C$2:$C$20, H2)

The dollar signs create absolute references for ranges (so you can copy the formula down) while G2 and H2 remain relative, allowing different criteria per row.

Date range filtering:

For dates, use two criteria on the same range:

=SUMIFS(D2:D100, A2:A100, ">=1/1/2024", A2:A100, "<=3/31/2024")

This sums D2:D100 where the date in A2:A100 falls in Q1 2024. Both conditions apply to the same range, which is perfectly valid.

Combining with IFERROR for robust formulas:

=IFERROR(SUMIFS(D2:D20, B2:B20, G2, C2:C20, H2), 0)

If SUMIFS encounters an error (mismatched ranges, invalid criteria), IFERROR returns 0 instead of an error message. This prevents dashboard breakage when data changes.

Handling blank cells:

To sum where a criteria range is blank:

=SUMIFS(D2:D20, B2:B20, "")

To sum where a criteria range is NOT blank:

=SUMIFS(D2:D20, B2:B20, "<>")

The “<>” operator means “not equal to empty.”

Common Errors and How to Fix Them

#VALUE! Error - Mismatched range sizes:

Incorrect:

=SUMIFS(D2:D20, B2:B20, "Electronics", C2:C25, "East")

B2:B20 has 19 rows, but C2:C25 has 24 rows. All ranges must match.

Correct:

=SUMIFS(D2:D20, B2:B20, "Electronics", C2:C20, "East")

Text criteria without quotes:

Incorrect:

=SUMIFS(D2:D20, B2:B20, Electronics)

Excel interprets this as a named range called “Electronics.”

Correct:

=SUMIFS(D2:D20, B2:B20, "Electronics")

Or reference a cell without quotes:

=SUMIFS(D2:D20, B2:B20, G2)

Performance with large datasets:

SUMIFS recalculates whenever referenced cells change. With 100,000+ rows and multiple SUMIFS formulas, this causes lag. Solutions:

  1. Convert data to a Table (Ctrl+T) for optimized calculation
  2. Use PivotTables for aggregation instead of formulas
  3. Set calculation to Manual (Formulas tab) and calculate explicitly
  4. Consider Power Query for transformation before analysis

Criteria not matching due to extra spaces:

If criteria don’t match expected results, check for leading/trailing spaces in your data. Use TRIM to clean data or modify criteria:

=SUMIFS(D2:D20, B2:B20, TRIM(G2))

Practical Use Case: Quarterly Sales Dashboard

Let’s build a practical quarterly sales report. Your data includes Order Date (A), Region (B), Product (C), and Amount (D).

Q1 Sales by Region:

=SUMIFS($D$2:$D$1000, $A$2:$A$1000, ">=1/1/2024", $A$2:$A$1000, "<=3/31/2024", $B$2:$B$1000, "East")

Place this in a summary table with “East” replaced by cell references to create a reusable template:

Region Q1 Sales
East =SUMIFS($D$2:$D$1000, $A$2:$A$1000, “>=”&$G$1, $A$2:$A$1000, “<=”&$G$2, $B$2:$B$1000, F3)
West =SUMIFS($D$2:$D$1000, $A$2:$A$1000, “>=”&$G$1, $A$2:$A$1000, “<=”&$G$2, $B$2:$B$1000, F4)

Where G1 contains the start date (1/1/2024) and G2 contains the end date (3/31/2024).

Product performance within a region:

=SUMIFS($D$2:$D$1000, $B$2:$B$1000, "East", $C$2:$C$1000, "Electronics", $D$2:$D$1000, ">500")

This identifies high-value Electronics sales in the East region.

Year-over-year comparison:

Create two SUMIFS formulas with different date ranges:

2024: =SUMIFS($D$2:$D$1000, $A$2:$A$1000, ">=1/1/2024", $A$2:$A$1000, "<=12/31/2024")
2023: =SUMIFS($D$2:$D$1000, $A$2:$A$1000, ">=1/1/2023", $A$2:$A$1000, "<=12/31/2023")

Then calculate percentage change in a third cell.

When to Use Alternatives

SUMIFS is powerful but not always optimal. Use PivotTables when you need to slice data multiple ways interactively. Use Power Query when you need to transform data before analysis. Use database queries (SQL) when working with millions of rows.

But for straightforward conditional summing in Excel with moderate datasets, SUMIFS is the right tool. Master the syntax, use cell references for flexibility, and watch for range alignment errors. Your financial models and dashboards will thank you.

Liked this? There's more.

Every week: one practical technique, explained simply, with code you can use immediately.