Countif formula is used to count the number of values appeared in a given range of data when it fulfills a certain criteria, the base look for function is as follows, =CountIf( Range, Criteria) range is the data range from which we want to count the instance and criteria is the condition we provide to this formula.

**COUNTIF Formula in Excel – Table of Contents**

## Excel formula for COUNTIF

“COUNT” “IF” as the formula name itself suggests counting if criteria match. Suppose in a range of cells if you have country names and out of that range if you want to count how many times “INDIA” appearing then you can use COUNTIF formula.

Like this using COUNTIF formula in excel, we can count specific values from the list of values in cells.

Let’s take look at the COUNTIF syntax now. It consists of only two parameters.

**Range:**Range is nothing but our range of cells which holds values.**Criteria:**Criteria is nothing but what do you want to count from the above range of values.

For example, take a look at the below range of values.

From the above list, I want to count the word INDIA.

### How to Use COUNTIF Formula in Excel (with Examples)

Below are some of the examples of Countif Formula in Excel.

#### Example #1

I have a list of ICC Cricket World Cup winners & runners list from the start of the world cup.

From this list, I want to count how many times **India **has won the world cup.

**Step 1: **Open Excel COUNTIF formula.

**Step 2: **Select the **Range **as winners list i.e. winners list is from B2 to B12.

**Step 3: **Next thing is **Criteria **i.e. what do we want to count from the selected range. So here we need to count “INDIA”.

Since it is a text value we need to supply in double quotes.

**Step 4: **Close the bracket and hit the enter key, we will have the count of INDIA.

So, India has won the ICC Cricket world cup two times. Like this using the COUNTIF function, we can count specific values.

If you want to count any other country you just need to replace the country name with INDIA.

#### Example #2

We have seen how to count text values in the range, now we will see how to count numerical values. I have a list of numbers and from this range of numbers, I want to count the number 25.

**Step 1: **Open Excel COUNTIF formula.

**Step 2: **Select the range as A2 to A9.

**Step 3: **Apply the criteria as 25. Since it is a numeric value no need of mentioning in double quotes. Apply the criteria and hit the enter key.

#### Example #3

We have seen how to supply the criteria directly to the formula, now we will see how to supply the criteria as a cell reference. Consider below list of values for example.

Form this above list of area code we need to count the area code **AUU70 **& **CMI74**.

**Step 1: **Open COUNTIF formula in E2 cell.

**Step 2: **Select the range as the area code.

Since we need to copy paste the formula to below cells, make the reference as the absolute reference by pressing F4 key once.

**Step 3: **Next part is criteria. In the earlier example, we have directly entered the criteria to the formula, but here we have criteria value in cells. So select the criteria as D2 cell.

**Step 4: **We are done, close the bracket and hit the enter key.

**Step 5: **Copy and paste the formula to the below cell.

### COUNITF with Logical Operators

We can also use logical operators with COUNTIF formula in excel. Logical excel operators are =, >, >=, <, <=.

For example, now take a look at the below example. I have a few numbers from A1 to A10.

From this list of numbers, I want to count which are less than 50. Remember I don’t want to count one number here rather I need the count of all the numbers which are less than 50.

Looks a strange example isn’t it? But nothing to worry, I will show you the way to count.

**Step 1: **Open Excel COUNTIF formula.

**Step 2: **Select the range as A1 to A10.

**Step 3: **Since we need to count values which are less than 50. First, we need to enter the symbol “<” in double quotes.

**Step 4: **Now mention the criteria as 50 with the ampersand symbol.

**Step 5: **Close the bracket and hit the enter key.

So, the total count of numbers which are less than 50 is 5.

### Things to Remember

- COUNTIF formula excel can count only one value at a time unless you apply with other formulas.
- If the supplied criteria value not found then it will return zero.
- If the criteria are the text we need to supply in double quotes if the text is cell reference then no need of double quotes.
- If you want to count based on multiple criteria you need to use COUNTIFS formula in excel.

### Recommended Articles

This has been a guide to COUNTIF Formula in Excel. Here we discuss How to use COUNTIF Formula in Excel along with practical examples and downloadable excel template. You may learn more about excel from the following articles –

- Examples of SUMIF with Multiple Criteria
- Power BI COUNTIF
- VBA in Copy Paste
- IF Formula in Excel
- VBA DIR in Excel
- How to use Countif not Blank in Excel
- Using COUNT Function in Excel
- COUNTA Excel
- Basic Excel Formulas List

- 35+ Courses
- 120+ Hours
- Full Lifetime Access
- Certificate of Completion