Count Values Between Two Numbers

Excel Formulas › Count

All versionsCOUNTIFS

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.


Quick formula: count values in B2:B100 from 70 to 89:
=COUNTIFS(B2:B100, ">=70", B2:B100, "<=89")
Two conditions on the same range — at least the lower bound and at most the upper — count the band.

Functions used (tap for the full reference guide):

The example

Scores between 70 and 89.

AB
1BandCount
270-893

The formula

Lower and upper bound on one range:

=COUNTIFS(B2:B100, ">=70", B2:B100, "<=89") // counts the 70-89 band

How it works

Two criteria define the window:

  1. List the same range twice with two conditions: ">=70" and "<=89".
  2. COUNTIFS counts rows meeting both — values inside the band.
  3. Use >/< for exclusive bounds instead of inclusive.
  4. 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

Live demo

Values + a low/high band.

Count:

Variations

Exclusive bounds

Strictly between:

=COUNTIFS(rng, ">70", rng, "<89")

From cells

Adjustable band:

=COUNTIFS(rng, ">="&E1, rng, "<="&E2)

With a category

Add another range:

=COUNTIFS(score, ">=70", score, "<=89", region, "East")

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

📊
Download the free Count Values Between Two Numbers practice workbook
A between-count sheet with exclusive, cell-bound, and category variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I count values between two numbers in Excel?
Use =COUNTIFS(range, ">=low", range, "<=high"). Listing the range twice with both bounds counts the in-between values.
How do I make the bounds adjustable?
Reference cells: =COUNTIFS(range, ">="&E1, range, "<="&E2).
How do I count strictly between (exclusive)?
Use > and < instead of >= and <=: =COUNTIFS(range, ">70", range, "<89").

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

Related formulas: COUNTIFS multiple criteria · Count dates in range · Histogram with FREQUENCY

Function references: COUNTIFS