Countif question

M

mtaystl11

I am trying to get a "Countif" function to count within a certain
number. Meaning, I need to get it to count how many cells are between
the number 5 and 10.

I understand that you can put

=countif(A31:A42, >32) or
=countif(A31:A42, <32) or
=countif(A31:A42, "32"

but how do I do the 5 through 10?

I have tried
=countif(A31:A42, 5-10) DIDNT WORK
=countif(A31:A42, "5-10") DIDNT WORK
=countif(A31:A42, 5;6;7;8;9;10) DIDNT WORK

I would really appreciate some help here. I'm sure it is a simple fix
but I just can't figure it out! THANKS!
 
D

Dave

mtaystl11

Try this and let me know if it works for you. It must be entered with
ctrl+shift+enter

=SUMPRODUCT(--(A1:A7>5),--(A1:A7<10))

Dave
 
G

Guest

Try
=COUNT(IF(A$31:A$42>=5,IF(A$31:A$42<=10,A$31:A$42)))

Commit with CTRL SHIFT ENTER. You should see {} around the entire formula
when complete.
 
G

Guest

Hi,

try =sumproduct(--(a1:a5>=5),--(a1:a5<=10))

adjust the range as you need

HTH
Regards from Brazil
Marcelo

"mtaystl11" escreveu:
 
D

Dave

mtaystl11

note that if you want to include values that equal 10 or 5 you need to
modify the formula with a couple of "=" signs to make it work.

Dave
 

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