SUMPRODUCT means Excel multiplies matching items in two or more arrays together, then adds all those products into a single number. In its simplest form, =SUMPRODUCT(A2:A6,B2:B6) takes the first cell of each range, multiplies them, moves to the next pair, and so on, then returns the sum of every result. It is one cell that replaces a whole helper column of multiplication sums, and with a small adjustment it becomes one of the most flexible counting and conditional-sum tools in Excel. This guide explains what the function does, how to write it safely, and how to use its array logic to filter by multiple conditions without adding columns to your sheet.

What You'll Need

  • Excel on desktop (Windows or Mac), Excel for the web, or Google Sheets, which uses the same function and arguments.
  • Two or more ranges with the same number of rows and columns, or a willingness to fix mismatches.
  • Numeric data in the ranges you want multiplied. Text is treated as zero, which is a common source of wrong totals.
  • Comma separators in most locales; some regional Excel versions expect semicolons, so check the formula bar if commas throw an error.

Step-by-Step

  1. Set up clean, aligned data. Put quantities and prices in two adjacent columns, with the same starting row and the same number of rows. For example, quantities in A2:A6 and prices in B2:B6. Do not include header text inside the ranges.
  2. Type the basic formula. Click an empty cell and enter =SUMPRODUCT(A2:A6,B2:B6). Press Enter. Excel multiplies A2 by B2, A3 by B3, and so on, then adds the five results.
  3. Check the result by hand once. Multiply the first pair on a calculator, then the second, and add them. Confirming the number matches teaches you exactly what the function is doing and catches bad ranges early.
  4. Add a third array if you have one. SUMPRODUCT accepts more arrays, so =SUMPRODUCT(A2:A6,B2:B6,C2:C6) multiplies quantity by price by a discount factor per row. All arrays must share the same dimensions.
  5. Use multiplication instead of a comma for conditions. This is where SUMPRODUCT becomes powerful. =SUMPRODUCT((C2:C6="North")*(D2:D6>100),B2:B6) sums column B only for rows where the region is North and the amount exceeds 100. Each condition in brackets returns TRUE or FALSE, which behaves as 1 or 0 when multiplied, so non-matching rows contribute zero.
  6. Count with conditions instead of summing. Drop the value range and wrap each condition in double parentheses, like =SUMPRODUCT((C2:C6="North")*(D2:D6>100)), and the formula counts matching rows. This gives you a multi-condition count without setting up a helper column.
  7. Add OR logic with a plus sign. =SUMPRODUCT(((C2:C6="North")+(C2:C6="South"))*(D2:D6>100)) counts rows where the region is North or South and the amount is above 100. Use plus for OR and asterisk for AND, and keep the whole OR group inside its own extra parentheses so the comparison applies correctly.
  8. Press Enter, not Ctrl+Shift+Enter, on modern Excel. Current versions handle SUMPRODUCT as a normal formula. Very old files may need the array-entry shortcut, and Excel will show curly braces around the formula if that was used. Modern Excel no longer needs them.
  9. Fill the formula down or across carefully. Lock the ranges with dollar signs, like $A$2:$A$6, before copying, so the ranges do not drift as you fill.
  10. Confirm the total against a filtered sum. Apply AutoFilter, select the matching rows, and compare with Excel's status bar sum. The two numbers should agree.

Common Mistakes

  • Ranges of different sizes. If one array has 5 rows and another has 6, Excel returns a #VALUE! error because it cannot pair up every item.
  • Text or blanks inside number ranges. Text is treated as zero in SUMPRODUCT, so a stray note in a quantity column silently lowers your total. Use ISNUMBER-style logic or clean the data.
  • Forgetting parentheses around conditions. (C2:C6="North")*D2:D6 without outer brackets often computes in the wrong order and gives nonsense. Wrap the whole condition group before multiplying by a value range.
  • Using wildcards or text criteria that do not match exactly. Exact matches are case-insensitive but must match the cell text, including spaces. Extra spaces after a word cause zero counts.
  • Assuming it works on whole columns blindly. Whole-column references like A:A multiply millions of empty cells and can slow older workbooks. Use bounded ranges.
  • Mixing comma and multiplication styles. Multiplying two arrays and also passing a third with a comma can produce unexpected results. Pick one style per formula.

Tips

  • SUMPRODUCT with conditions is a classic alternative to SUMIFS and COUNTIFS. SUMIFS is usually faster on large data, but SUMPRODUCT handles conditions SUMIFS cannot, such as comparing two columns row by row.
  • To compare two ranges directly, write =SUMPRODUCT(--(A2:A6=B2:B6)), which counts rows where the two columns are identical. The double minus converts TRUE and FALSE into 1 and 0.
  • Use -- or *1 alone when there is only one condition, so you get a clean count.
  • Keep the calculation ranges as named ranges so long formulas stay readable.
  • Convert the source data to an Excel Table if you plan to grow it; structured references keep the formula readable, though SUMPRODUCT still needs matching lengths.
  • Build conditions one at a time, checking the count after each addition, so you know which condition breaks the result.

Troubleshooting

If you get #VALUE!, the most likely cause is mismatched range sizes. Select each range and confirm they cover the same number of rows. Next, check for text in any numeric array. If you see 0 when you expect a count, inspect the criteria for trailing spaces and confirm the values are stored as numbers, not text. Cells formatted as text look like numbers but do not compare as you expect.

If the result is too high or too low, test each condition separately in its own cell and watch whether it produces the expected count. When a formula works in one row but breaks when filled down, a missing dollar sign on the ranges is usually the culprit. If commas cause an error, your regional settings likely require semicolons; replace them and see if the formula parses. In very old workbooks, try entering the formula with Ctrl+Shift+Enter and check whether curly braces appear. If the file still misbehaves, recalculate with F9 or reopen the workbook before assuming the formula is wrong.

Frequently Asked Questions

What does SUMPRODUCT actually stand for?

Sum of products: it multiplies corresponding values across arrays and sums the results. The name describes the maths, not any hidden feature.

Is SUMPRODUCT the same as SUMIFS?

Not quite. SUMIFS sums values matching criteria and is usually faster. SUMPRODUCT does conditional sums and counts too, but can also compare arrays row by row, which SUMIFS cannot.

Why do people use double minus signs in SUMPRODUCT?

Conditions return TRUE or FALSE, and multiplying or double-negating turns them into 1 or 0 so they can be counted or used as filters.

Can SUMPRODUCT work with text?

It can test text in conditions, but multiplying text ranges together returns zero for those cells. Only numeric arrays should be multiplied.

Does SUMPRODUCT work in Google Sheets?

Yes. Google Sheets uses the same function name, arguments and array logic, so the formulas here transfer directly.