Count non-contiguous cells where value is greater than 0

A

anre5180

A1,A2,A3,A4,A5,A6,A7,A8
5,5,6,0,4,1,7,0

Count the cells A1,A3,A4,A6,A8 where value is greater than 0

return should be 3

how do i do this?

Please note it is NOT a range(otherwise it would be easy), they are
non-contiguos.
 
B

Bob Phillips

=SUM(COUNTIF(INDIRECT({"A1","A3","A4","A6","A8"}),">0"))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
A

anre5180

Bob said:
=SUM(COUNTIF(INDIRECT({"A1","A3","A4","A6","A8"}),">0"))

--

HTH

Bob Phillips

Hey THANKS A LOT !!! It works perfectly. I have to explorer more that
SUM and INDIRECT combination since i knew about the countif.
 

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