Difference between revisions of "Documentation/How Tos/Calc: SUMPRODUCT function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(→See also:: added fns) |
|||
Line 24: | Line 24: | ||
=== See also: === | === See also: === | ||
− | '''[[Documentation/How_Tos/Calc: SUM function|SUM | + | '''[[Documentation/How_Tos/Calc: SUM function|SUM]]''', |
− | '''[[Documentation/How_Tos/Calc: SUMIF function|SUMIF | + | '''[[Documentation/How_Tos/Calc: SUMIF function|SUMIF]]''', |
− | '''[[Documentation/How_Tos/Calc: SUMSQ function|SUMSQ function]]''' | + | '''[[Documentation/How_Tos/Calc: SUMSQ function|SUMSQ]]''', |
+ | '''[[Documentation/How_Tos/Calc: SUMX2MY2 function|SUMX2MY2]]''', | ||
+ | '''[[Documentation/How_Tos/Calc: SUMX2PY2 function|SUMX2PY2]]''', | ||
+ | '''[[Documentation/How_Tos/Calc: SUMXMY2 function|SUMXMY2]]''' | ||
'''[[Documentation/How_Tos/Conditional Counting and Summation|Conditional Counting and Summation]]''' | '''[[Documentation/How_Tos/Conditional Counting and Summation|Conditional Counting and Summation]]''' |
Revision as of 06:50, 15 March 2008
SUMPRODUCT
Multiplies corresponding elements in the given ranges, and returns the sum of those products.
Syntax:
SUMPRODUCT(range1; range2; ... range30)
- range1 to range30 are up to 30 ranges whose corresponding elements are to be multiplied.
- You can use SUMPRODUCT to calculate the scalar product of two vectors.
- SUMPRODUCT evaluates in array mode, but does not need to be entered as an array formula.
- SUMPRODUCT can also be used to sum cells where a specified condition is true - see Conditional Counting and Summation.
Example:
SUMPRODUCT(A1:B2; C1:D2)
- returns A1*C1 + B1*D1 + A2*C2 + B2*D2:
=SUMPRODUCT(A1:A6=”red”; B1:B6=”big”; C1:C6)
- returns the sum of cells in C1:C6 whose corresponding entries in the A column are red and in the B column are big.
See also:
SUM, SUMIF, SUMSQ, SUMX2MY2, SUMX2PY2, SUMXMY2