How SUMPRODUCT works
Syntax
=SUMPRODUCT(array1, [array2], ...)array1- The first range of numbers.
array2, ...- Optional. More ranges of the same size; matching items are multiplied together.
Example
Scores are in B2:B5 and their weights (20%, 30%, 30%, 20%) in C2:C5. You want the weighted average.
=SUMPRODUCT(B2:B5, C2:C5)Multiplies each score by its weight and adds them up. If the weights don't add to 100%, divide by SUM(C2:C5).
Common mistakes
- Ranges of different sizes, which gives #VALUE!. B2:B5 and C2:C6 don't match.
- Text or blank-looking cells that hold spaces. They count as 0 or cause errors.
- Using commas between conditions: =SUMPRODUCT((A2:A9="North"),B2:B9) adds nothing. Multiply instead: =SUMPRODUCT((A2:A9="North")*B2:B9).
Questions people ask
How do I use SUMPRODUCT with a condition?
Multiply by a TRUE/FALSE test: =SUMPRODUCT((A2:A100="North")*B2:B100*C2:C100) totals price times units for North only.
How do I calculate a weighted average?
=SUMPRODUCT(values, weights)/SUM(weights).
Practice it above: type the formula in the formula bar and press Enter to check.