Counting occurance of >0 in two columns

C

cbrown

I have two columns, mostly of zeros, and want to count the number of times
both columns are not zero in the same row.

eg
0 5
0 0
1 0
4 2
29 55
0 0
7 4

answer is 3.

I have tried =COUNT(IF((R4:R35>=0)*(S4:S35>=0),R4:R35)), which comes back as
zero. other attempted methods give 0 or value errors, or wrong answers.

thanks for the help
 
T

T. Valko

Assuming the numbers are *always* positive...

=SUMPRODUCT(--(A1:A7>0),--(B1:B7>0))
 

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