What is the use of COUNTIF condition in Excel?

COUNTIF is an Excel function to count cells in a range that meet a single condition. COUNTIF can be used to count cells that contain dates, numbers, and text. The criteria used in COUNTIF support logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.

  • Purpose: Count cells that match the criteria
  • Return value: A number representing cells counted.


=COUNTIF (range, criteria)


  • range - The range of cells to count.
  • criteria - The criteria that control which cells should be counted.