SUMPRODUCT

See Also

Multiplies corresponding components in the given arrays, and returns the sum of those products.

Syntax

SUMPRODUCT(array1,array2,array3,...)

Array1, array2, array3, ...   are 2 to 30 arrays whose components you want to multiply and then add.

Remarks

Example

The example may be easier to understand if you copy it to a blank spreadsheet.

How?

  1. Create a blank spreadsheet.
  2. Select the example in the Help topic.

    Selecting example from Help

    Selecting an example from Help

  3. Press CTRL+C.
  4. In the spreadsheet, select cell A1, and press CTRL+V.
  5. To switch between viewing the formula that returns the result and the result in the cell, select the cell and press F2 and then ENTER, or click Commands and Options on the spreadsheet toolbar, click the Formula tab, and look in the Formula in active cell (active cell) box.
 
Array 1 Array 1 Array 2 Array 2
3 4 2 7
8 6 6 7
1 9 5 3
Formula Description (Result)
=SUMPRODUCT(A2:B4, C2:D4) Multiplies all the components of the two arrays and then adds the products รน that is, 3*2 + 4*7 + 8*6 + 6*7 + 1*5 + 9*3. (156)

Note   The preceding example returns the same result as the formula SUM(A2:B4*C2:D4) entered as an array. Using arrays provides a more general solution for doing operations similar to SUMPRODUCT. For example, you can calculate the sum of the squares of the elements in A2:B4 by using the formula =SUM(A2:B4^2) and pressing CTRL+SHIFT+ENTER.