SUMPRODUCT()

SyntaxSUMPRODUCT(array1,array2,array3,...)

Definition. This function multiplies the matching components of the indicated arrays and returns the sum of these products.

Arguments

Background. For a sum product, the values in an array are multiplied and the results are added. The formula is:

a1 b1

a2 b2 = (a1 · b1 + a2 · b2 + a3 · b3)

a3 b3

For example, you can calculate the total price of the products listed in a table.

The array arguments must have the same number of rows and columns. If they do not, the SUMPRODUCT() function returns the #VALUE! error. SUMPRODUCT() treats array entries that are not numeric as if they were zeros.

Example. Suppose you want to calculate the total price for the following products:

The result is calculated as follows:

Total price = 12 • 0.39 + 15 • 0.42 = 10.98

In Excel, the initial values are entered in two arrays (see Figure 16-34).

Arrays containing the amount and price.

Figure 16-34. Arrays containing the amount and price.

Enter the following formula in the formula bar:

=SUMPRODUCT(B2:B3,C2:C3)

See Also

MMULT(), PRODUCT(), SUM()