countif formula

  • Thread starter Thread starter Cindy
  • Start date Start date
C

Cindy

I have a range (b1:b100) of numbers from 1 to 100. I'm
trying to use a formula that would look at the entire
list of numbers and count those that are in a certain
range. For example: = to or greater than 30 and = to or
less than 34.

I tried countif(b1:b100,and(>=30,<=34)) but it doesnt
seem to be working.

Any help will be greatly appreciated.

Cindy.
 
=COUNTIF(B1:B100,">="&E1)-COUNTIF(B1:B100,">"&F1)

where E1 houses a value like 30 and F1 34.

Equivalently...

=SUMPRODUCT(--(B1:B100>=E1),--(B1:B100<=F1)
 
Back
Top