Syntax. COUNTIF(range,criteria)

Definition. This function counts the cells within a range whose content matches the search criteria.


  • range (required). The cell range from which you want to count the cells meeting the search criteria.

  • criteria (required). The criteria in the form of a number, an expression, or text. The criteria determine which cells will be counted. Criteria can be expressed as numbers (such as 2000), text (such as none), or a cell reference (such as B5).

Background. You can analyze your data based on a condition. However, it is not obvious why this function is categorized as a statistic function and not as a math and trigonometry function.

The COUNTIF() function can use only a precise value as search criterion. ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.