I have a column of numbers, some positive, some negative.

S

Skip

I would like to count the number of entries that are >3 and are <=7.
What function would I use? Thanks for any help.
 
D

Donald Guillett

I would like to count the number of entries that are >3 and are <=7.
What function would I use?  Thanks for any help.

In xl 2007 look in the help index for countIFS. In less than xl 2007
look in the help index for COUNTIF and AND
 
J

joeu2004

I would like to count the number of entries that are

One way:

=COUNTIF(A1:A100,"<=7")-COUNTIF(A1:A100,"<=3")

More straight-forwardly:

=SUMPRODUCT((A1:A100>3)*(A1:A100<=7))

=COUNTIFS(A1:A100,">3",A1:A100,"<=7")

The last one is the best. But it is available only in XL2007 and
later.

In the SUMPRODUCT, multiply (*) acts like AND. We cannot use AND in
that context.
 
S

Skip

One way:

=COUNTIF(A1:A100,"<=7")-COUNTIF(A1:A100,"<=3")

More straight-forwardly:

=SUMPRODUCT((A1:A100>3)*(A1:A100<=7))

=COUNTIFS(A1:A100,">3",A1:A100,"<=7")

The last one is the best.  But it is available only in XL2007 and
later.

In the SUMPRODUCT, multiply (*) acts like AND.  We cannot use AND in
that context.

Thanks, SUBPRODUCT works great. Thanks again
 

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