SUMIF with Two Criteria in Excel (3 Ways)

Formulas & functions · Updated November 22, 2026

To sum values based on two criteria in Excel, use SUMIFS (the plural version of SUMIF), which is designed exactly for multiple conditions. For example, =SUMIFS(C2:C10, A2:A10, "North", B2:B10, "Widget") sums all amounts in C2:C10 where column A equals “North” and column B equals “Widget”.

Why SUMIF Falls Short for Two Criteria

The original SUMIF function accepts only one criteria range and one condition. Its syntax is =SUMIF(range, criteria, [sum_range]). If you try to add a second condition, Excel returns a #VALUE! error or you end up with a formula that ignores one condition entirely. Some users attempt to concatenate criteria inside SUMIF, like =SUMIF(A2:A10&B2:B10, "NorthWidget", C2:C10), but this requires array entry (Ctrl+Shift+Enter in older versions) and is fragile. The clean, native solution is SUMIFS, introduced in Excel 2007 and available in all modern versions, including Excel for Microsoft 365, Excel 2021, and Excel for the web.

How SUMIFS Works: Syntax and Order

Unlike SUMIF, SUMIFS puts the sum range first, then pairs of criteria ranges and criteria. The full syntax is:

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

Assume your data has:

  • Region in A2:A10
  • Product in B2:B10
  • Sales in C2:C10

To sum sales for “North” region and “Widget” product, enter:

=SUMIFS(C2:C10, A2:A10, "North", B2:B10, "Widget")

If the data has North=2 rows (100 and 150) and Widget appears in both, the result is 250. The order matters: sum_range first, then each criteria range immediately followed by its criterion. You can add up to 127 pairs in modern Excel.

Using Cell References and Wildcards

Hardcoding text in quotes works, but you’ll usually reference cells. With the same layout, put “North” in E1 and “Widget” in F1, then use:

=SUMIFS(C2:C10, A2:A10, E1, B2:B10, F1)

Wildcards are supported in SUMIFS criteria. Use an asterisk (*) for any sequence of characters and a question mark (?) for a single character. For example, to sum all products starting with “Wid”, use "Wid*". To sum all regions ending in “th”, use "*th". If you need to match a literal asterisk or question mark, precede it with a tilde (~), like "~*".

Alternatives: SUMPRODUCT and FILTER

While SUMIFS is the most efficient, two other approaches work in specific situations:

  • SUMPRODUCT – Works in all Excel versions and can handle more complex logic (e.g., OR conditions). For two criteria, use =SUMPRODUCT((A2:A10="North")*(B2:B10="Widget")*C2:C10). This multiplies the TRUE/FALSE arrays (converted to 1/0) by the sales values. It’s less readable and slower on large datasets, but it’s flexible for conditions like “North OR South”.
  • FILTER – Available in Excel 2021 and Microsoft 365. Use =SUM(FILTER(C2:C10, (A2:A10="North")*(B2:B10="Widget"))). FILTER returns an array of matching sales, and SUM adds them. This is useful if you also need to see the matching rows, not just the total.

For most cases, SUMIFS is the best choice because it’s built for this task, recalculates quickly, and is easy to audit.

Common Mistakes and How to Fix Them

Several errors trip up users when summing with two criteria:

  • Mismatched range sizes – All criteria ranges and the sum range must have the same number of rows and columns. If A2:A10 and B2:B15 are used, SUMIFS returns #VALUE!. Keep every range the same size.
  • Using SUMIF instead of SUMIFS – SUMIF cannot handle two criteria natively. If you need two, switch to SUMIFS.
  • Criteria with extra spaces – If your data has “North ” with a trailing space, the criterion “North” won’t match. Use TRIM on your data or reference a cell that contains the exact text.
  • Numeric criteria as text – If you write "=100" as a criterion, Excel treats it as text. Use 100 (no quotes) or ">=100" for comparison operators.
  • Case sensitivity – SUMIFS is not case-sensitive. “north” matches “North”. If you need case-sensitive matching, use SUMPRODUCT with EXACT.

Using SUMIFS with Dates and Blank Cells

Dates are stored as numbers in Excel, so you can use comparison operators. To sum sales after a specific date (say, in cell G1), use =SUMIFS(C2:C10, A2:A10, ">"&G1) – note the ampersand to join the operator with the cell reference. For blank criteria, use "=" to match empty cells, or "<>" for non-empty cells. For example, to sum sales where region is blank, use =SUMIFS(C2:C10, A2:A10, "=").

Frequently Asked Questions

Can I use SUMIFS with OR logic (e.g., North OR South)?
SUMIFS uses AND logic – all criteria must be true. For OR, use SUMPRODUCT with addition: =SUMPRODUCT(((A2:A10="North")+(A2:A10="South"))*C2:C10). Or use two SUMIFS and add them: =SUMIFS(C2:C10,A2:A10,"North")+SUMIFS(C2:C10,A2:A10,"South").

Why does my SUMIFS return 0 when I can see matching rows?
Check for hidden characters, extra spaces, or that the criteria range includes the correct column. Also, if your criteria is a cell reference, ensure that cell contains the exact value (no leading apostrophe). Use the TRIM function on your data if needed.

Does SUMIFS work in Google Sheets?
Yes, SUMIFS works identically in Google Sheets. The syntax and behavior are the same. However, in Google Sheets, you might also use QUERY for more complex conditions.

What is the difference between SUMIF and SUMIFS?
SUMIF takes the sum range as the third argument and supports only one criteria pair. SUMIFS takes the sum range first and supports multiple criteria pairs. For a single criterion, both work, but SUMIFS is more consistent for future changes.

Can I use SUMIFS with whole column references like A:A?
Yes, you can use =SUMIFS(C:C, A:A, "North", B:B, "Widget"). This is convenient but may slow down calculation if used many times over large sheets. It’s fine for moderate datasets.

Final Tip: Test with a Small Sample

Before applying SUMIFS to a large dataset, test on a few rows to confirm the criteria match exactly. Use the Filter feature (Data > Filter) to visually verify which rows meet both conditions, then compare with your formula result. This catches typos and formatting issues early.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.