×
英语
很抱歉。本文没有你的语言版本。

SUMPRODUCT function

This article describes the formula syntax and usage of the SUMPRODUCT function in Microsoft Excel.

Description

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

Syntax

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

The SUMPRODUCT function syntax has the following arguments:

  • Array1     Required. The first array argument whose components you want to multiply and then add.

  • Array2, array3,...     Optional. Array arguments 2 to 255 whose components you want to multiply and then add.

Remarks

  • The array arguments must have the same dimensions. If they do not, SUMPRODUCT returns the #VALUE! error value.

  • SUMPRODUCT treats array entries that are not numeric as if they were zeros.

Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Array 1

Array 2

3

4

2

7

8

6

6

7

1

9

5

3

Formula

Description

Result

=SUMPRODUCT(A2:B4, D2:E4)

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)

156

扩展你的 Office 技能
了解培训
抢先获得新功能
加入 Office 预览体验计划

此信息是否有帮助?

谢谢您的反馈!

谢谢你的反馈! 可能需要转接到 Office 支持专员。

×