This Excel tutorial explains how to use the Excel COUNTIF function with syntax and examples.
If you wish to apply multiple criteria, try using the COUNTIFS function.
criteria is used to determine which cells to count.
Based on the spreadsheet above, the following Excel COUNTIF examples would return:
Description
The Microsoft Excel COUNTIF function counts the number of cells in a range, that meets a given criteria.If you wish to apply multiple criteria, try using the COUNTIFS function.
Syntax
The syntax for the Microsoft Excel COUNTIF function is:COUNTIF( range, criteria )
Parameters or Arguments
range is the range of cells that you want to count based on the criteria.criteria is used to determine which cells to count.
Applies To
The COUNTIF function can be used in the following versions of Microsoft Excel:- Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Type of Excel Function
The COUNTIF function can be used in Microsoft Excel as the following type of function:- Worksheet function (WS)
Example (as Worksheet Function)
Let's look at some Excel COUNTIF function examples and explore how to use the COUNTIF function as a worksheet function in Microsoft Excel:Based on the spreadsheet above, the following Excel COUNTIF examples would return:
=COUNTIF(A2:A7, D2) Result: 1 =COUNTIF(A:A, D2) Result: 1 =COUNTIF(A2:A7, ">=2001") Result: 4