Excel COUNTIF Function counts the number of cells which meet a given criterion.
In simple words, you can specify a value and count the number of cells which have that value from a given range of cells.
- range A range of cells from which you want to count the cells which meet criteria.
- criteria A criteria to check to count cells.
1. Using Logical Operators as a Criteria: In the below example, we have used ">75" (a logical operator) to count the number of students who scored more than 75.
If you want to use a logical operator you have to put it inside the double quotation marks.
2. Using Dates as a Criteria: In the below example, we have used a date in criteria to find out how many employees have a week off on 4th July.
We have inserted a date directly into the function as COUNTIF automatically converts a text into a date.
In the above example, we have inserted same date as a number and as you know Excel stores a date as a number. So you can also insert a number which represents a date as per Excel's date system.