Count cells between two numbers
This tutorial shows how to count the cells between two numbers using the COUNTIFS function
Hard coded formula
Cell reference formula
=COUNTIFS(C8:C12,">=50",C8:C12,"<=100")
=COUNTIFS(C8:C12,">="&C4,C8:C12,"<="&C5)
|
GENERIC FORMULA
=COUNTIFS(range,">=smallest_num",range,"<=largest_num")
ARGUMENTS GENERIC FORMULA
=COUNTIFS(range,">="&smallest_num,range,"<="&largest_num)
ARGUMENTS EXPLANATION This formula uses the COUNTIFS function to count the number of cells that contain values that are between two numbers.
The COUNTIFS function uses two criteria where one states that it must be greater than or equal to the smallest number and the other states that it must be less than or equal to the largest number. The criteria range for both of these criteria is the same, which represents that range that captures the values from which you want to count the cells that fall between the two number. In this example the range from which we are counting the number of cells that fall between the two number is C8 to C12, the smallest number is captured in cell C4 (cell reference) or directly entered into the formula as 50 (hard coded) and the largest number is captured in cell C5 (cell reference) or directly entered into the formula as 100 (hard coded).
Click on either the Hard Coded or Cell Reference button to view the formula that has the smallest and largest number that you want to count between directly entered into the formula or referenced to specific cells. |
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Count cells if greater than or equal to | How to count cells that are greater than or equal to a specific value | |
Count cells if less than or equal to | How to count cells that are less than or equal to a specific value |
RELATED FUNCTIONS
Related Functions | Description | Related Functions and Description |
---|---|---|
COUNTIFS Function | The Excel COUNTIFS function returns the number of cells in a range that meet one or more specified criteria |