COUNTIF

Used only in ReliaSoft Workbooks

Description: Counts the number of cells within a specified range that meet the criteria you specify.

Syntax: COUNTIF(Range, Criteria)

  • Range is the range of cells from which you want to count cells.
  • Criteria is the criteria in the form of a number, expression, cell reference, or text that defines which cells will be counted. For example, Criteria can be expressed as 32, "32", ">32", "apples", or B4.

Remarks:

  • The software provides additional functions that can be used to analyze your data based on a condition. For example, to calculate a sum based on a string of text or a number within a range, use the SUMIF function. To have a formula return one of two values based on a condition, such as a sales bonus based on a specified sales amount, use the IF function.

Example:

  • Suppose A2:A5 contain "apples", "oranges", "peaches", "apples", respectively:

COUNTIF(A2:A5, "apples") = 2 [number of cells with apples]

  • Suppose B2:B5 contain 32, 54, 75, 86, respectively:

COUNTIF(B2:B5, ">55") = 2 [number of cells with a value greater than 55]