Returns the count based on a condition.


= COUNTIF(range, criteria)


  • range: A range of cells from which you want to count the cells which meet criteria.
  • criteria: A criteria (Case Sensitive) to check to count cells.


  • You can use a number, text, cell reference, or formula as criteria.
  • You can also use wildcard characters in criteria.
  • Criteria other than numbers and formulas need to enclose in double quotation marks.
  • You can also use logical operators in criteria.


Written by Puneet for Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel for Mac