In what situations can't I use SUMPRODUCT inst

2019-07-22 15:55发布

According to the Microsoft documentation, MMULT returns the matrix product of two arrays while SUMPRODUCT multiplies corresponding components in the given arrays, and returns the sum of those products.

I don't see in what situations I cannot use SUMPRODUCT instead of MMULT. And I missing something?

标签: excel
1条回答
欢心
2楼-- · 2019-07-22 16:00

SUMPRODUCT only allows you to operate on same sized arrays to get a single result.

MMULT can multiply differently sized arrays (as long as the rules are followed) to give you an array result.

The rule is that the first argument of MMULT must have as many columns as the second argument has rows, so you can use this formula, for example

=MMULT(A3:C6,E3:E5)

where the first array is 4*3 (4 rows by 3 columns) and the second argument is 3*1 (3 rows by 1 column) and that returns a 4*1 array

查看更多
登录 后发表回答