I have a column of numbers, some positive, some negative.
On Mar 23, 6:09*am, Skip wrote:
I would like to count the number of entries that are
3 and are <=7. What function would I use?
One way:
=COUNTIF(A1:A100,"<=7")-COUNTIF(A1:A100,"<=3")
More straight-forwardly:
=SUMPRODUCT((A1:A1003)*(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.
|