Difference between revisions of "Documentation/How Tos/Calc: SUM function"
From Apache OpenOffice Wiki
< Documentation | How Tos
OOoWikiBot (Talk | contribs) m (Robot: Automated text replacement %s) |
|||
Line 11: | Line 11: | ||
: <tt>'''SUM'''</tt> ignores any text or empty cell within a range or array. | : <tt>'''SUM'''</tt> ignores any text or empty cell within a range or array. | ||
− | : <tt>'''SUM'''</tt> can also be used to sum or count cells where a specified condition is true - see [[Documentation/How_Tos/Conditional Counting and Summation|Conditional Counting and Summation]] | + | : <tt>'''SUM'''</tt> can also be used to sum or count cells where a specified condition is true - see [[Documentation/How_Tos/Conditional Counting and Summation|Conditional Counting and Summation]]. |
=== Example: === | === Example: === | ||
Line 28: | Line 28: | ||
* [[Documentation/How_Tos/Calc: SUMIF function|SUMIF]] | * [[Documentation/How_Tos/Calc: SUMIF function|SUMIF]] | ||
* [[Documentation/How_Tos/Calc: SUMSQ function|SUMSQ]] | * [[Documentation/How_Tos/Calc: SUMSQ function|SUMSQ]] | ||
− | * [[Documentation/How_Tos/Calc: SUMPRODUCT function|SUMPRODUCT]] | + | * [[Documentation/How_Tos/Calc: SUMPRODUCT function|SUMPRODUCT]] |
− | * [[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]] | + | * [[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]] |
− | * [[Documentation/How_Tos/Conditional Counting and Summation|Conditional Counting and Summation]] | + | * [[Documentation/How_Tos/Conditional Counting and Summation|Conditional Counting and Summation]] |
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | * [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]] | ||
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} | * [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}} |
Revision as of 14:41, 26 February 2009
SUM
Sums the contents of cells.
Syntax:
SUM(number1; number2; ... number30)
- number1 to number30 are up to 30 numbers or ranges/arrays of numbers whose sum is to be calculated.
- SUM ignores any text or empty cell within a range or array.
- SUM can also be used to sum or count cells where a specified condition is true - see Conditional Counting and Summation.
Example:
SUM(2; 3; 4)
- returns 9, because 2+3+4 = 9.
SUM(B1:B3)
- (where cells B1, B2, B3 contain 1.1, 2.2, 3.3) returns 6.6.
Template:Documentation/SeeAlso
Issues:
- In Excel SUM ignores logical values (that is, it treats them as 0). In Calc TRUE is 1 and FALSE is 0.