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.

## Syntax

COUNTIF(range, criteria)

**range**A range of cells from which you want to count the cells which meet criteria.**criteria**A criteria to check to count cells.

## More Information

- You can use a number, text, cell reference or a 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.
- Criteria are case insensitive.

## Examples

**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.

## Leave A Comment