Excel: Scalar product of two ranges

ExcelFormulaScalar

Excel Problem Overview


I am trying to find a proper way to calculate the scalar product of two ranges. For instance, the product of A1:A3 and B1:B3 would be A1*B1 + A2*B2 + A3*B3. Is there a good way to do this? Hardcoding this calculation is quite a tedious thing to do with large ranges.

Excel Solutions


Solution 1 - Excel

Use this one

=SUMPRODUCT(A1:A3,B1:B3)

Solution 2 - Excel

SUMPRODUCT formula – syntax and usage

Excel SUMPRODUCT formula - tutorialThe sum-product formula syntax is very simple. It takes 1 or more arrays of numbers and gets the sum of products of corresponding numbers.

The syntax is =SUMPRODUCT (list 1, list 2 ...)

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLee WhiteView Question on Stackoverflow
Solution 1 - ExcelDmitry PavlivView Answer on Stackoverflow
Solution 2 - Exceluser3278923View Answer on Stackoverflow