countif formula

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.
 
A

Aladin Akyurek

=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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top