SUMIF & SUMIFS Complete Guide — Every Pattern You'll Actually Use (2026)
Home› Functions› Math› SUMIF & SUMIFS Complete Guide
Excel Complete Guide

SUMIF & SUMIFS — the complete guide

SUMIF and SUMIFS are the workhorses of Excel aggregation — everything from monthly totals to region-by-product dashboards runs on these two functions. This guide covers every pattern that actually matters: single-condition sums, multi-criteria filters, the date-range template you'll use weekly, wildcards, the dashboard pattern, common mistakes, and when to reach for SUMPRODUCT instead.

📊

Companion Workbook — 8 sheets, 75 live formulas

Includes basic SUMIF, multi-criteria SUMIFS, date range template, wildcard patterns, and a working dashboard.

Download workbook →

⚡ Quick Answer

SUMIF sums values that meet ONE condition: =SUMIF(range, criteria, [sum_range]). SUMIFS handles multiple conditions and uses reversed argument order: =SUMIFS(sum_range, criteria_range1, criteria1, ...). Use SUMIFS by default even for single conditions — the consistent argument order prevents mistakes when you later add criteria.

SUMIF vs SUMIFS — the fundamentals

Both functions add numbers, but only rows that match a condition. That's the entire concept. Everything else is argument order and edge cases.

SUMIF (Excel 2003+) handles a single condition. Its argument order is range, criteria, [sum_range] — the range you're testing comes first, the condition second, and the range to sum comes last (and is optional; when omitted, SUMIF sums the tested range itself).

SUMIFS (Excel 2007+) handles up to 127 conditions. Its argument order is reversed and consistent: sum_range, criteria_range1, criteria1, criteria_range2, criteria2, .... The range you're summing comes FIRST, then pairs of criteria.

The argument-order flip is deliberate — SUMIFS puts sum_range first so it's always in the same position no matter how many criteria you tack on. But this design decision is also the source of most SUMIF/SUMIFS confusion. Once you internalize which function puts sum_range where, most of the friction disappears.

Recommendation: default to SUMIFS

SUMIFS works fine with a single condition. Using it everywhere means your formulas have consistent argument order, and adding a second criterion later is a simple append rather than a rewrite. The only reason to reach for SUMIF now is legacy compatibility with Excel 2003, which is 20+ years out of date.

Syntax anatomy

SUMIF syntax breakdown

=SUMIF(range, criteria, [sum_range]) // Example: =SUMIF(A2:A100, "Widget", B2:B100) sums column B where A = "Widget"

SUMIF arguments

1
range

The range of cells to test against your condition. Required.

2
criteria

The condition each cell must meet. Can be a number (100), text ("Widget"), a comparison (">500"), or a wildcard pattern ("Apple*"). Text and operators must be quoted.

3
sum_range (optional)

The range to actually sum. When omitted, SUMIF sums the values in range itself. Useful for things like "sum all values greater than 100."

SUMIFS syntax breakdown

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...) // Example: =SUMIFS(D2:D100, A2:A100, "Widget", B2:B100, "North") // Sums column D where A = "Widget" AND B = "North"

SUMIFS arguments

1
sum_range

The range containing values to sum. Comes FIRST — this is the biggest difference from SUMIF. Required.

2
criteria_range1, criteria1

The first condition pair. criteria_range1 is where to test; criteria1 is what to match. Required.

3
criteria_range2, criteria2, ... (optional)

Additional condition pairs, up to 127 total. All conditions must be true (AND logic) for a row to be included in the sum.

Critical rule: ranges must be the same size

Every range in SUMIFS — the sum_range and every criteria_range — must have exactly the same number of rows and columns. Mismatched ranges throw #VALUE!. This trips up almost everyone at least once.

Basic SUMIF — 6 patterns

Start here if you're new to conditional sums. Each of these six patterns represents a real business question you'll encounter often.

Pattern 1

Sum where column matches a specific text value

Sum all sales where the product is "Laptop":

=SUMIF(A2:A11, "Laptop", D2:D11)

Text criteria must be in quotes. This is the most common SUMIF pattern — one column of categories, another of numbers, sum the numbers for a specific category.

Pattern 2

Sum where column matches a cell reference

Change the criteria without editing the formula by pointing at a cell:

=SUMIF(A2:A11, F1, D2:D11)

F1 holds the product name to sum. Change F1 and the total updates. This is the pattern to use for interactive dashboards.

Pattern 3

Sum values greater than a threshold

Sum all amounts over $500:

=SUMIF(D2:D11, ">500")

When the sum_range is omitted, SUMIF sums the tested range itself. The operator and value must be quoted together as a string. Also works with "<", ">=", "<=", and "<>" (not equal).

Pattern 4

Sum values greater than a cell value (concatenation)

Sum amounts greater than the threshold in F1:

=SUMIF(D2:D11, ">"&F1)

The & operator concatenates the string operator with the cell reference. This is essential for dynamic thresholds. A common mistake: writing ">F1" (quoted) instead of ">"&F1 — the first treats "F1" as literal text.

Pattern 5

Sum where NOT equal to a value

Sum everything except discontinued products:

=SUMIF(A2:A11, "<>Discontinued", D2:D11)

The <> operator means "not equal to." Useful for excluding a specific category from a total.

Pattern 6

Sum non-blank cells

Sum only rows where column A has a value:

=SUMIF(A2:A11, "<>", D2:D11)

Sum where column A is empty:

=SUMIF(A2:A11, "", D2:D11)

Handy for cleaning up totals when your data has partial rows.

The 75-formula companion workbook has every pattern live

Each pattern above is on the "Basic SUMIF" sheet with editable inputs. Change the yellow-highlighted cell to test different criteria and watch the totals recalculate. Download it here.

SUMIFS with multiple criteria

SUMIFS extends the same conditional-sum idea to multiple criteria. All conditions must match (AND logic) for a row to be included.

Two conditions

Two criteria

Sum laptop sales in the North region

=SUMIFS(D2:D11, A2:A11, "Laptop", B2:B11, "North")

Reads as: sum column D where column A is "Laptop" AND column B is "North". The sum_range is first, then pairs of (range, criteria).

Three conditions with comparison operators

Three criteria

Furniture in East region above $400

=SUMIFS(D2:D11, C2:C11, "Furniture", B2:B11, "East", D2:D11, ">400")

Notice that D2:D11 appears twice — once as the sum_range and once as a criteria_range. That's perfectly legal and common. The condition ">400" filters the same numbers being summed.

Cell-reference criteria for interactive filtering

Dashboard-style

Sum by two selectable inputs

=SUMIFS(D2:D11, A2:A11, F1, B2:B11, F2)

F1 holds the product name; F2 holds the region. Users change either cell and the total updates. This is the fundamental building block for any interactive Excel dashboard.

SUMIFS is fine with one condition

=SUMIFS(D2:D11, A2:A11, "Widget") is just as valid as SUMIF. The advantage: consistent syntax across your whole workbook. Every conditional sum reads the same way — sum_range first, then criteria pairs. Fewer surprises when someone else opens your file.

Date range sums — the everyday pattern

This is the single most common real-world SUMIFS use case. If you take one pattern away from this guide, take this one. Memorize the template and adapt it forever.

The template

=SUMIFS(amount_range,
        date_range, ">="&start_date,
        date_range, "<="&end_date)

Two conditions on the same column: greater-than-or-equal to the start date AND less-than-or-equal to the end date. The & operator concatenates the comparison operator with the date cell reference — this is essential.

Concrete example — sum January 2026 sales

Hardcoded dates

January 2026 total using DATE()

=SUMIFS(C2:C13, A2:A13, ">="&DATE(2026,1,1),
                 A2:A13, "<="&DATE(2026,1,31))

Using DATE(year, month, day) makes the boundaries explicit and prevents ambiguous date-format issues. Great for one-off queries.

Cell inputs

User-controllable date range

=SUMIFS(C2:C13, A2:A13, ">="&F1,
                 A2:A13, "<="&F2)

F1 and F2 hold the start and end dates as regular date values. Users pick their own date range without editing formulas.

Full month with EOMONTH

Any month, any year with automatic month-end

=SUMIFS(C2:C13, A2:A13, ">="&DATE(Year, Month, 1),
                 A2:A13, "<="&EOMONTH(DATE(Year, Month, 1), 0))

EOMONTH(date, 0) returns the last day of the given date's month. Combined with DATE(Year, Month, 1) for the first day, this gives you a complete month range regardless of how many days it has.

Common date-range mistake

Writing ">=F1" (with F1 inside the quotes) makes Excel search for the literal string "F1". No match, result is zero. Always concatenate: ">="&F1. This one edit fixes 80% of "why is my SUMIFS returning zero?" questions.

Year-to-date (YTD) totals

YTD

Sum from January 1 to today

=SUMIFS(C2:C100, A2:A100, ">="&DATE(YEAR(TODAY()),1,1),
                  A2:A100, "<="&TODAY())

TODAY() refreshes every time the workbook recalculates. Perfect for live YTD dashboards. Combine with YEAR(TODAY()) to get the current year's January 1 dynamically.

Wildcards for text pattern matching

Wildcards let SUMIF and SUMIFS match text patterns instead of exact strings. Two wildcards are supported:

WildcardMeaningExample
*Any sequence of characters (including none)"Apple*" matches "Apple", "Apple iPhone", "Apple Watch"
?Exactly one character"P?RD" matches "PARD", "PBRD", but not "PARRD"
~*Literal asterisk (escape)Rare — matches text containing an actual "*"
~?Literal question markRare — matches text containing an actual "?"
Starts-with

Sum all Apple products

=SUMIF(A2:A11, "Apple*", C2:C11)

Matches any row where column A begins with "Apple". Catches "Apple iPhone", "Apple Watch", "Apple MacBook Pro", etc.

Contains

Sum any product containing "Pro"

=SUMIF(A2:A11, "*Pro*", C2:C11)

Wildcards on both sides mean the search string can appear anywhere. Matches "MacBook Pro", "iPad Pro", "Pro Camera Kit."

Dynamic wildcard

Search-box style — variable pattern from a cell

=SUMIF(A2:A11, "*"&F1&"*", C2:C11)

F1 holds the search term. Wrapping with "*"&...&"*" makes it a contains search. Change F1 to search different terms interactively.

Wildcards + SUMIFS

Combined pattern and category filter

=SUMIFS(C2:C11, A2:A11, "Samsung*", B2:B11, "Electronics")

Wildcards work in every criteria slot of SUMIFS. Here: any Samsung product, only within the Electronics category.

Wildcards only work on text

Numbers and dates don't support wildcards. SUMIF(D2:D11, "5*", ...) won't match numbers starting with 5 — Excel treats "5*" as an exact string that doesn't match any number. For pattern matching on numeric data, use >= and <= with comparison operators instead.

Dashboard pattern — aggregation for reporting

Real dashboards run on SUMIFS. Here's the structure that scales from a single KPI to a full sales dashboard.

The KPI panel

A dashboard usually starts with a set of headline numbers — total sales, sales by region, sales by top product. Each metric is one SUMIF or SUMIFS pointing at the raw data:

Total Sales:           =SUM(Data!D:D)
Widget Sales:          =SUMIF(Data!A:A, "Widget", Data!D:D)
North Region Sales:    =SUMIF(Data!B:B, "North", Data!D:D)
Widgets in North:      =SUMIFS(Data!D:D, Data!A:A, "Widget", Data!B:B, "North")
Whole-column references are fine here

Using Data!D:D (whole column) rather than Data!D2:D1000 keeps the formula stable as data grows. Modern Excel handles whole-column SUMIFS efficiently on datasets up to hundreds of thousands of rows.

The cross-tab (rep × product)

The classic dashboard layout: rows are reps, columns are products, cells are SUMIFS totals. Structure your reference table with rep names down column A (starting row 22) and product names across row 21:

Cell B22: =SUMIFS($E$5:$E$16, $B$5:$B$16, $A22, $D$5:$D$16, B$21)

The dollar signs pin the data ranges and the header/label cells. As you drag this formula across and down, only $A22 (row-relative) and B$21 (column-relative) shift, keeping your data references stable and your labels dynamic. This is the fundamental cross-tabulation formula.

Adding time to the cross-tab

For a period-over-period comparison — say, sales by rep by month — the formula extends with two more date conditions:

=SUMIFS($E$5:$E$16,
        $B$5:$B$16, $A22,
        $A$5:$A$16, ">="&DATE(YEAR, MONTH, 1),
        $A$5:$A$16, "<="&EOMONTH(DATE(YEAR, MONTH, 1), 0))

You now have a monthly grid: one row per rep, one column per month, each cell a full SUMIFS. This is how monthly sales dashboards are built, from small businesses to Fortune 500 revenue tracking.

The Dashboard Pattern sheet has a live example

The companion workbook has a "Dashboard Pattern" sheet with a full KPI panel (9 metrics) and a working rep × product cross-tab. Copy the pattern for your own dashboards.

SUMIF vs SUMIFS — when to use which

AspectSUMIFSUMIFS
Introduced inExcel 2003Excel 2007
Number of conditions1 onlyUp to 127
Argument order(range, criteria, [sum_range])(sum_range, criteria_range1, criteria1, ...)
sum_range positionLast, optionalFIRST, required
WildcardsYes (*, ?)Yes (*, ?)
Comparison operatorsYes (in quotes)Yes (in quotes)
Best forSingle condition (legacy)Everything else
Common mistakeSwapping range/sum_rangeArgument order flip from SUMIF

Same problem, both approaches

SUMIF way
=SUMIF(A2:A11,
       "Widget",
       D2:D11)
SUMIFS way
=SUMIFS(D2:D11,
        A2:A11,
        "Widget")

Both give the same result. The SUMIFS version is preferable because when you inevitably need to add a second condition, it's append not rewrite. See our SUMIF vs SUMIFS deep dive for more comparisons and benchmarks.

Common errors and fixes

Error 1: SUMIFS returns zero when data clearly matches

Symptom

You can see rows that should match, but the total is zero. No error message, just wrong result.

Cause & fix

Three usual culprits, in order of likelihood:

1. Hidden whitespace. "Widget " with a trailing space doesn't equal "Widget". Wrap the criteria column with TRIM in a helper column, or fix the source data.

2. Numbers stored as text. A cell showing "100" might actually be the text string "100" — SUMIFS treats it as unsummable. Fix with paste-special multiply by 1, or wrap with VALUE().

3. Argument order. Confusing SUMIF's order (sum_range last) with SUMIFS's order (sum_range first). Double-check.

Error 2: #VALUE! from range size mismatch

Symptom

Formula returns #VALUE!. Data looks fine.

Cause & fix

Every range in SUMIFS must be exactly the same shape. =SUMIFS(B5:B8, A5:A9, "Widget") fails because B5:B8 is 4 cells but A5:A9 is 5. Line up all ranges to the same rows: =SUMIFS(B5:B8, A5:A8, "Widget"). This also matters if you use whole-column references — A:A and B:B both work, but mixing A2:A100 with B:B won't.

Error 3: Criteria comparison not working

Symptom

You try =SUMIF(D2:D11, >500) and Excel rejects the formula entry as invalid.

Cause & fix

Comparison operators in criteria must be quoted as strings: ">500". This applies to all comparison operators: ">", "<", ">=", "<=", and "<>". Correct: =SUMIF(D2:D11, ">500").

Error 4: Cell reference treated as literal text

Symptom

=SUMIF(D2:D11, ">F1") returns zero even though there are values greater than F1.

Cause & fix

"F1" inside the quotes is literal text, not a cell reference. Excel searches for values greater than the string "F1" — impossible, result is zero. Concatenate with &: =SUMIF(D2:D11, ">"&F1). The operator stays quoted, the cell reference stays unquoted, and & joins them.

Error 5: #NAME? from misspelled function or bad reference

Symptom

#NAME? error even though the formula looks syntactically correct.

Cause & fix

Usually a typo — SUMIFS misspelled as SUMIF or SUMIFFS, or a named range doesn't exist. Check the function spelling and confirm any named ranges are defined (Formulas → Name Manager). Excel highlights the function name in blue when it's recognized; if yours stays black, that's your problem. See our complete errors guide for more error-diagnosis techniques.

When to use SUMPRODUCT instead

SUMIFS is fast, clear, and handles most conditional-sum needs. But there are three specific situations where SUMPRODUCT is the better tool.

1. OR logic across different columns

SUMIFS uses AND logic — every condition must be true. For OR logic across the same column, you can add multiple SUMIFS calls:

=SUMIFS(sales, region, "North") + SUMIFS(sales, region, "East")

But for OR logic across different columns — "sum where region is North OR product is Widget" — SUMPRODUCT is cleaner:

=SUMPRODUCT((region_range="North") + (product_range="Widget") > 0) * sales_range)

2. Math on the summed values before summing

If you need to multiply, divide, or transform values before aggregating, SUMPRODUCT handles it naturally:

=SUMPRODUCT((region_range="North") * quantity_range * price_range)

This sums quantity × price for North region — a weighted sum that SUMIFS can't do directly without a helper column.

3. Legacy compatibility (Excel 2003)

SUMIFS didn't exist before Excel 2007. If you're maintaining a workbook that must open in ancient versions, SUMPRODUCT is the multi-criteria fallback. Rare in 2026, but sometimes still relevant for regulated industries with locked-down IT.

SUMPRODUCT is significantly slower

SUMIFS uses optimized internal algorithms designed for filtered aggregation. SUMPRODUCT does full array multiplication over your entire range. On datasets over 10,000 rows, SUMIFS can be 10-100x faster. Reserve SUMPRODUCT for cases SUMIFS genuinely can't handle, not as a preference.

Frequently asked questions

What's the difference between SUMIF and SUMIFS?

SUMIF handles ONE condition. SUMIFS handles up to 127. The argument order also differs: SUMIF puts the range first and sum_range last (which is optional); SUMIFS puts sum_range FIRST, then pairs of criteria_range and criteria. Use SUMIFS by default even for single conditions — the consistent argument order prevents future mistakes when you need to add more criteria.

How do I sum values between two dates in Excel?

Use SUMIFS with two date conditions: =SUMIFS(amount_range, date_range, ">="&start_date_cell, date_range, "<="&end_date_cell). The & operator concatenates the operator with the cell reference. This is the most common SUMIFS pattern — memorize this template and adapt it for any date range aggregation.

Do wildcards work in SUMIF?

Yes. Use asterisk (*) for any sequence of characters and question mark (?) for exactly one character. Example: =SUMIF(A2:A100, "Apple*", B2:B100) sums all rows where column A starts with "Apple". Wildcards only work with text criteria, not numbers or dates. To match a literal asterisk or question mark, prefix with tilde: ~* or ~?.

Why does my SUMIFS return zero when the data is clearly there?

Three usual causes: (1) hidden whitespace — "Widget " with trailing space doesn't match "Widget"; run TRIM on your data first. (2) Number stored as text — a value showing as 100 might actually be the text "100"; use VALUE() to convert or paste-special multiply by 1. (3) Wrong argument order — SUMIFS puts sum_range FIRST, unlike SUMIF where it's last.

Can I use SUMIFS with OR logic?

SUMIFS uses AND logic — all conditions must be true. For OR logic across the same criteria column, sum multiple SUMIFS calls: =SUMIFS(sales, region, "North") + SUMIFS(sales, region, "East"). For more complex OR logic, use SUMPRODUCT with array conditions, or unpivot your data first.

Is SUMIFS faster than SUMPRODUCT?

Yes, significantly. SUMIFS is optimized for filtered aggregation and uses efficient internal algorithms. SUMPRODUCT performs full array multiplication, which scales linearly with data size. For datasets over 10,000 rows, SUMIFS can be 10-100x faster. Reserve SUMPRODUCT for cases SUMIFS can't handle — OR logic across different columns, math on the summed values before summing, etc.

Does SUMIFS work in Google Sheets?

Yes, identically. Same syntax, same behavior. Google Sheets also supports SUMIF, SUMPRODUCT, and wildcards the same way. Anything you learn about SUMIF/SUMIFS in Excel transfers directly to Sheets.

📥

Grab the companion workbook

75 live formulas across 8 sheets — every pattern from this guide, editable and ready to copy.

Download workbook →