counting items in range

J

Jennifer

I need to count the number of items that are within a given data range

Example
Cell: A1 A2 A3 A4 A5 A
Number: 47 22 42 35 49 5

I need to count how many numbers are <50 and >30, which is

Is there anyway to do this? I thought about doing an AND function and then use a CountIf function to count the number of TRUES, but I thought there would be a better way. I have about 200 + numbers I have to go through to see how many lay in what ranges

Thanks for your help in Advance!
 
P

Peo Sjoblom

=COUNTIF(Range,">30")-COUNTIF(Range,">=50")

or

=SUMPRODUCT(--(Range>30),--(Range<50))

--

Regards,

Peo Sjoblom


Jennifer said:
I need to count the number of items that are within a given data range.

Example:
Cell: A1 A2 A3 A4 A5 A6
Number: 47 22 42 35 49 53

I need to count how many numbers are <50 and >30, which is 4

Is there anyway to do this? I thought about doing an AND function and
then use a CountIf function to count the number of TRUES, but I thought
there would be a better way. I have about 200 + numbers I have to go
through to see how many lay in what ranges.
 
J

Jennifer

For future reference

on the sumproduct function, what does '--' represent? Is that another way to do an array? Thanks.
 
P

Peo Sjoblom

It will force the Boolean values (TRUE,FALSE) into either 1s or 0s,
then you can use the built in construction of the SUMPRODUCT


--

Regards,

Peo Sjoblom


Jennifer said:
For future reference,

on the sumproduct function, what does '--' represent? Is that another way
to do an array? Thanks.
 

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