# How to Count Between Two Numbers (COUNTIFS Function) in Excel

COUNTIFS function allows Excel to count numbers that lie between two values.

For this guide, we will use an example of a class mark sheet. We will use the COUNTIFS function to count how many students fall in a particular group depending on their marks.

## Counting between two numbers using COUNTIFS

1. Select the cell where you want to apply the COUNTIFS function. This cell will display the count of students with marks between the two numbers we enter as our conditions.

2. Write the COUNTIFS function in the cell with an opening bracket.
``=COUNTIFS(``

3. Select the criteria range by highlighting cells where you want to apply the condition. Select criteria range.

Once you have selected the criteria range, add a comma.

4. Since we are using the COUNTIFS function to count between two numbers, we will apply two conditions. For example, in Group A – we will only consider students with marks above 70 but below 90.Type the first condition in quotation marks. Add a comma once you have entered the condition.

5. Select the criteria range for the second condition and add a comma. The criteria range will be the same as before.

Our final formula looks like this:

``"=COUNTIFS(B3:B17,">70",B3:B17,"<90")"``
7. Press Enter to apply the formula. 