SUM behaves the same way. We cannot expect programmer to get everything
right!
Let's take a more concrete example. When E22 is greater than 10 would what
the average of (a1:A10 plus E22) but otherwise just the average of A1:A10.
As you point out, the formula =AVERAGE(A1:A6,IF(E22>10,E22,"")) returns
#VALUE! when the IF results in a null string.
But very often you can avoid IF. This gives the correct result when E22 has
a numeric value or is blank =SUM(A1:A6,E22*(E22>10))/(COUNT(A1:A6)+(E22>10))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
"THOMAS CONLON" <(E-Mail Removed)> wrote in message
news:5V0bh.7483$Kw2.3038@trndny05...
> Average has what seems to be an odd (inconsistant) behavior to me. I want
> to be able to have a value of "" within the average function arguments,
> and for it to still return a result.
>
> For instance, if i have a cell with value 1 in it, and a cell with the
> following formula in it: "=IF(TRUE,"","")", and i then use Average
> function, with range that includes those two cells, result of Average is
> "1" [which is correct, and is what i want].
>
> But, if i have the following use of Average function:
> =Average(1,IF(TRUE,"","")), Average function returns #VALUE.
>
> In my mind, those two results seem to be inconsistant!
>
> Is there a way to get around that second behavior, and have that use of
> Average function return "1", just like the first use?
>
> Thanks, tom
>
>