because if values could be negative as well as positive, then
legitimate values could also be zero, so the only time it make sense
(mathematically) to exclude zeros is when all values should be only
positive or only negative.
=AVERAGE(IF(H2:H132<>0,H2:H132)) is the function I wrote from your example
and I am still getting an error. Is there anything wrong with the function I
have typed?
=AVERAGE(IF(H2:H132<>0,H2:H132)) is the function I wrote from your example
and I am still getting an error. Is there anything wrong with the function I
have typed? ....
"Biff" wrote: ....
The "rng" in Harlan's formula is simply "range", i.e. in your case
H2:H132
Following Harlan's argument I assume you have only positive values and
zeroes and you can therefore use
=AVERAGE(IF(H2:H132>0,H2:H132))
This formula needs to be confirmed with CTRL+SHIFT+ENTER (as Biff says)
so that curly braces appear around the formula in the formula bar,
alternatively you can use a formula which just requires ENTER
=SUM(H2:H132)/MAX(1,COUNTIF(H2:H132,">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.