Difference between revisions of "Documentation/How Tos/Calc: SUM function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Example:)
m
Line 3: Line 3:
 
== SUM  ==
 
== SUM  ==
 
Sums the contents of cells.
 
Sums the contents of cells.
 +
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 10: Line 11:
  
 
<tt>'''SUM'''</tt> can also be used to sum 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 cells where a specified condition is true - see '''[[Documentation/How_Tos/Conditional Counting and Summation|Conditional Counting and Summation]]'''.  
 +
  
 
=== Example: ===
 
=== Example: ===
Line 20: Line 22:
  
 
: (where cells <tt>'''B1'''</tt>, <tt>'''B2'''</tt>, <tt>'''B3'''</tt> contain <tt>'''1.1'''</tt>, <tt>'''2.2'''</tt>, <tt>'''3.3'''</tt>) returns <tt>'''6.6'''</tt>.
 
: (where cells <tt>'''B1'''</tt>, <tt>'''B2'''</tt>, <tt>'''B3'''</tt> contain <tt>'''1.1'''</tt>, <tt>'''2.2'''</tt>, <tt>'''3.3'''</tt>) returns <tt>'''6.6'''</tt>.
 +
  
 
=== See also: ===
 
=== See also: ===
Line 27: Line 30:
 
'''[[Documentation/How_Tos/Calc: SUMSQ function|SUMSQ function]]''',
 
'''[[Documentation/How_Tos/Calc: SUMSQ function|SUMSQ function]]''',
 
'''[[Documentation/How_Tos/Calc: SUMPRODUCT function|SUMPRODUCT function]]'''
 
'''[[Documentation/How_Tos/Calc: SUMPRODUCT function|SUMPRODUCT function]]'''
 +
 +
'''[[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]]'''

Revision as of 00:01, 5 December 2007


SUM

Sums the contents of cells.


Syntax:

SUM(number1; number2; ... number30)

number1 to number30 are up to 30 numbers or ranges of numbers whose sum is to be calculated.

SUM can also be used to sum 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.


See also:

SUBTOTAL function, DSUM function, SUMIF function, SUMSQ function, SUMPRODUCT function

Mathematical functions

Conditional Counting and Summation

Personal tools