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

From Apache OpenOffice Wiki
Jump to: navigation, search
(initial content)
 
Line 3: Line 3:
 
== COUNT ==
 
== COUNT ==
 
Counts the numbers in the list of arguments. Text entries are ignored.
 
Counts the numbers in the list of arguments. Text entries are ignored.
 +
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 8: Line 9:
  
 
<tt>'''value1'''</tt> to <tt>'''value30'''</tt> are up to 30 values or ranges representing the values to be counted.
 
<tt>'''value1'''</tt> to <tt>'''value30'''</tt> are up to 30 values or ranges representing the values to be counted.
 +
  
 
=== Example: ===
 
=== Example: ===
{| border="0"
 
|<tt>'''COUNT(2; 4; 6; "eight")'''</tt>
 
| returns <tt>'''3'''</tt>, because <tt>'''2'''</tt>, <tt>'''4'''</tt> and <tt>'''6'''</tt> are numbers ('''"eight"''' is text).
 
  
|-
+
<tt>'''COUNT(2; 4; 6; "eight")'''</tt>
|<tt>'''COUNT(B1:B3)'''</tt>
+
: returns <tt>'''3'''</tt>, because <tt>'''2'''</tt>, <tt>'''4'''</tt> and <tt>'''6'''</tt> are numbers (<tt>'''"eight"'''</tt> is text).
| where cells <tt>'''B1'''</tt>, <tt>'''B2'''</tt>, <tt>'''B3'''</tt> contain <tt>'''1.1'''</tt>, <tt>'''2.2'''</tt>, and <tt>'''apple'''</tt> returns <tt>'''2'''</tt>.
+
 
 +
<tt>'''COUNT(B1:B3)'''</tt>
 +
: where cells <tt>'''B1'''</tt>, <tt>'''B2'''</tt>, <tt>'''B3'''</tt> contain <tt>'''1.1'''</tt>, <tt>'''2.2'''</tt>, and <tt>'''apple'''</tt> returns <tt>'''2'''</tt>.
  
|}
 
  
 
=== See also: ===
 
=== See also: ===
 
'''[[Documentation/How_Tos/Calc: COUNTA function|COUNTA function]]''', '''[[Documentation/How_Tos/Calc: COUNTIF function|COUNTIF function]]''', '''[[Documentation/How_Tos/Calc: COUNTBLANK function|COUNTBLANK function]]''', '''[[Documentation/How_Tos/Calc: SUM function|SUM function]]'''
 
'''[[Documentation/How_Tos/Calc: COUNTA function|COUNTA function]]''', '''[[Documentation/How_Tos/Calc: COUNTIF function|COUNTIF function]]''', '''[[Documentation/How_Tos/Calc: COUNTBLANK function|COUNTBLANK function]]''', '''[[Documentation/How_Tos/Calc: SUM function|SUM function]]'''

Revision as of 09:07, 3 December 2007


COUNT

Counts the numbers in the list of arguments. Text entries are ignored.


Syntax:

COUNT(value1; value2; ... value30)

value1 to value30 are up to 30 values or ranges representing the values to be counted.


Example:

COUNT(2; 4; 6; "eight")

returns 3, because 2, 4 and 6 are numbers ("eight" is text).

COUNT(B1:B3)

where cells B1, B2, B3 contain 1.1, 2.2, and apple returns 2.


See also:

COUNTA function, COUNTIF function, COUNTBLANK function, SUM function

Personal tools