How to Count Values Between Two Numbers in Excel

Count how many measurements fall inside a range with COUNTIFS — perfect for quality checks, score bands and price ranges.

You will learn to

  • Count values between a lower and upper limit
  • Read the limits from cells
  • Turn an in-range count into an out-of-spec rate

How it works

To count values that fall between two numbers, give COUNTIFS the same range twice, once with the lower limit and once with the upper: =COUNTIFS(B2:B13,">=335",B2:B13,"<=345"). Use >= and <= to include the limits themselves, or > and < to exclude them.

Put the limits in cells and join them with & (">="&E2) so anyone can change the band without touching the formula. Divide by COUNT to turn the result into a percentage — for example, the share of products that pass inspection.

=COUNTIFS(B2:B13,">=335",B2:B13,"<=345")