How many values fall in a range — scores 70 to 89, orders $100 to $500? COUNTIFS with a lower and upper bound counts the in-between values.
The example
Scores between 70 and 89.
| A | B | |
|---|---|---|
| 1 | Band | Count |
| 2 | 70-89 | 3 |
The formula
Lower and upper bound on one range:
How it works
Two criteria define the window:
- List the same range twice with two conditions:
">=70"and"<=89". - COUNTIFS counts rows meeting both — values inside the band.
- Use
>/<for exclusive bounds instead of inclusive. - Reference cells for the bounds —
">="&E1— to make the band adjustable.
Histogram bins are just a stack of these — one COUNTIFS per band builds a frequency table without FREQUENCY. Reference the band edges in cells so you can retune them.
Try it: interactive demo
Values + a low/high band.
Variations
Exclusive bounds
Strictly between:
From cells
Adjustable band:
With a category
Add another range:
Pitfalls & errors
Repeat the range. Both conditions reference the same range — list it twice, once per bound.
Inclusive vs exclusive. >=/<= include the edges; >/< exclude them.
Concatenate with cells. Use ">="&E1, not ">=E1", when the bound is in a cell.
Practice workbook
Frequently asked questions
How do I count values between two numbers in Excel?
How do I make the bounds adjustable?
How do I count strictly between (exclusive)?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class