OpenOffice3.org Calc 3. Mathematical Functions

COUNTIF(Range;Criteria) Function

Count the number of cells in a given range that meet the condition set. This function returns an integer greater than or equal to 0. The argument “Range” contains a reference to a range of cells, indicates the range evaluated. The argument “Criteria” contains the condition that each cell must meet to be included in the count. This argument may contain a constant, expression or reference to a cell containing the condition to be fulfilled. Look the examples to better understand this function:

=COUNTIF(A1:C3;12) Returns 2. Count the number of cells in the range A1:C3 containing the number 12. The result vary depending on the contents of the range evaluated.
=COUNTIF(E1:F3;'rojo') Returns 4. Count the number of cells in the range E1:F3 containing the text “rojo”.
=COUNTIF(A1:B4;">6") Returns the number of cells in the range A1:B4 containing a number greater than six (6).

Back to the list of mathematical functions