Average if
As per JMB from another thread asking exactly the same question within a few hours......
=SUM(G7:G9,G12:G15)/(SUMPRODUCT(--(G7:G9<0))+SUMPRODUCT(--(G12:G15<0)))
It is interesting that we can check for <0 when we use SUMPRODUCT, but we can't check for <0 when we use COUNTIF. This is because COUNTIF will also count null and blank.
Epinn
"Curtis" wrote in message ...
How do I calculate the averages of numbers in 2 sets of ranges... excluding
zero vaules?
Thanks
|