What is the SUMPRODUCT function?
=SUMPRODUCT(array1, [array2], ...)SUMPRODUCT multiplies the values in matching positions of several ranges and adds them all up. Use it to get a total of quantity × price in one step.
The ranges must be the same size, or you get #VALUE!. Cells that are not numbers count as 0. Column D shows the product for each row.
Arguments
- array1
- The first range.
- array2, ...
- More ranges of the same size.
SUMPRODUCT examples
Example 1. Total order amount
=SUMPRODUCT(B2:B6, C2:C6)3×1500 + 2×2400 + 1×3200 + 4×4500 + 0×6900 = 30500.
Example 2. Sum with a condition
=SUMPRODUCT((A2:A6="Apple")*B2:B6)Multiply by a condition (TRUE/FALSE) to add only the matching values.
Common mistakes
Ranges of different sizes
You get #VALUE!.
Using SUM and multiplication separately
=SUM(B2:B6)*SUM(C2:C6) is a completely different value.
FAQ
- Does it need an array formula?
- No. SUMPRODUCT handles arrays without Ctrl+Shift+Enter.
- Three ranges?
- Yes. It multiplies the three values in each position and adds them.