Table of Contents
The COUNTIF function in Excel is a useful tool for counting the number of cells that meet specific criteria. In order to count the number of cells that are greater than one number but less than another number, you can use the COUNTIF function with the appropriate conditions. By specifying the range of cells and the criteria for the count, the function will return the total number of cells that fall within the specified range. This can be helpful in analyzing data and finding the number of occurrences within a particular range.
Excel: COUNTIF Greater Than But Less Than Some Number
You can use the following formula to count the number of cells in Excel that are greater than but less than some number:
=COUNTIFS(B:B,">15",B:B,"<25")
This particular formula counts the number of cells in column B where the value is greater than 15 but less than 25.
The following example shows how to use this formula in practice.
Example: COUNTIF Greater Than But Less Than
Suppose we have the following dataset in Excel that shows the number of points scored by basketball players on various teams:

We can use the following formula to count the number of cells in the column that have a value greater than 15 but less than 25:
=COUNTIFS(B2:B11,">15",B2:B11,"<25")
The following screenshot shows how to use this formula in practice:

We can see that a total of 3 cells in the Points column have a value greater than 15 but less than 25.
We can verify this is correct by manually identifying each of these cells in the data:

Note: You can find the complete documentation for the COUNTIFS function in Excel .
Additional Resources
The following tutorials explain how to perform other common tasks in Excel:
Cite this article
stats writer (2024). “How can I use the COUNTIF function in Excel to count the number of cells that are greater than one number but less than another number?”. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-countif-function-in-excel-to-count-the-number-of-cells-that-are-greater-than-one-number-but-less-than-another-number/
stats writer. "“How can I use the COUNTIF function in Excel to count the number of cells that are greater than one number but less than another number?”." PSYCHOLOGICAL SCALES, 30 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-countif-function-in-excel-to-count-the-number-of-cells-that-are-greater-than-one-number-but-less-than-another-number/.
stats writer. "“How can I use the COUNTIF function in Excel to count the number of cells that are greater than one number but less than another number?”." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-countif-function-in-excel-to-count-the-number-of-cells-that-are-greater-than-one-number-but-less-than-another-number/.
stats writer (2024) '“How can I use the COUNTIF function in Excel to count the number of cells that are greater than one number but less than another number?”', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-countif-function-in-excel-to-count-the-number-of-cells-that-are-greater-than-one-number-but-less-than-another-number/.
[1] stats writer, "“How can I use the COUNTIF function in Excel to count the number of cells that are greater than one number but less than another number?”," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. “How can I use the COUNTIF function in Excel to count the number of cells that are greater than one number but less than another number?”. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
