=Countif (not zero)

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hello All,
Using Excel XP.

I have the following sample worksheet:
A
--------------------
1 17
2 6
3 20
4 0
5 11
6 0
-----------------
7 2 (=countif(A1:A6,"<15", ???

I want to count the values in A1:A6 if they are less than 15 but not
counting any zero's.
In A7 I would want the result to be 2. Any help writing the formula would
be
appreciated.

Mike
 
Try these:

=COUNTIF(A1:A6,"<15")-COUNTIF(A1:A6,0)

=SUMPRODUCT((A1:A6>0)*(A1:A6<15))
 
Here are two ways:

=COUNTIF(A1:A6,"<15") - COUNTIF(A1:A6, "=0")


=SUMPRODUCT(--(A1:A6>0),--(A1:A6<15) )


Hope this helps.
 

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

Similar Threads


Back
Top