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

From Apache OpenOffice Wiki

< Documentation | How Tos

(→Issues:) |
|||

Line 29: | Line 29: | ||

* The draft ODFF standard requires that text representations of numbers are NOT counted. Calc complies for text representations of numbers in cells, in contrast to Excel. However, COUNT(4; "4") will return 2, as inline strings are converted to numbers if possible. This is described in the ODFF standard (28Dec07) in section 2.2 page 35. | * The draft ODFF standard requires that text representations of numbers are NOT counted. Calc complies for text representations of numbers in cells, in contrast to Excel. However, COUNT(4; "4") will return 2, as inline strings are converted to numbers if possible. This is described in the ODFF standard (28Dec07) in section 2.2 page 35. | ||

+ | |||

+ | [[fr:Documentation/FR/Calc:Fonction_NB]] |

## Revision as of 21:05, 27 March 2008

## COUNT

Counts the numbers in the list of arguments, ignoring text entries.

### Syntax:

**COUNT(value1; value2; ... value30)**

` value1` to

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

**value30**### Example:

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

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

**COUNT(B1:B3)**

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

### See also:

**COUNTA**,
**COUNTIF**,
**COUNTBLANK**,
**SUM**

### Issues:

- The draft ODFF standard requires error values to be ignored, not propagated as in Calc. See issue 51068.

- The draft ODFF standard requires that text representations of numbers are NOT counted. Calc complies for text representations of numbers in cells, in contrast to Excel. However, COUNT(4; "4") will return 2, as inline strings are converted to numbers if possible. This is described in the ODFF standard (28Dec07) in section 2.2 page 35.