countif formula accross two columns

A

Afsha

I have two coulumns with values. i want to count number of records which are
more than 0 in both columns. E.g:
Column A Coulumn B
0 0
5 6
0 1
3 2

Therefore I want the answer to come back as 2 as two rows have both columns
with a value of more than 0.

thanks
Afsha
 
P

pinmaster

Hi,

Perfect for a sumproduct function:

=SUMPRODUCT((A1:A10>0)*(B1:B10>0))

Cheers!
Jean-Guy
 
J

JLatham

Another way to write it:
=SUMPRODUCT(--(A1:A4>0), --(B1:B4>0))

but pinmaster's is shorter and both give the same result.
 
Top