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

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.

6. Type the second condition and add a closing bracket.

Our final formula looks like this:

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

8. Copy and paste the formula into other cells and apply the relevant conditions for those cells.

Phoebe is an HR assistant in her day job, but is also a web blogger that loves writing guides and sharing her experiences. When she is not out with her friends, she enjoys traveling or binge-watching Netflix. She graduated with a BA in Communication and Media Studies from the University of Utah, and is a chief editor at TechObservatory.