Ignore errors when calculation average of multiple ranges
Nice! Definitely much simpler and more efficient. Although I would
change it slightly to the following...
=AVERAGE(IF(ISNUMBER(D4:P4),D4:P4),IF(ISNUMBER(U4: AG4),U4:AG4))
....confirmed with CONTROL+SHIFT+ENTER.
Three reasons:
1) Your formula seems to count empty cells, whereas this syntax seems to
ignore them.
2) It's a little easier to understand.
3) It looks nicer. :)
In article ,
"
wrote:
"joshkraemer" wrote:
Here's what I want to do (but doesn't work):
{AVERAGE(IF(ISERROR(D4:P4,U4:AG4),"",D4:P4,U4:AG4) )}
[....] I want to be able to ignore all errors when calculating
an average for _multiple_(2)_ranges_
General form of the array formula (ctrl-shift-Enter):
=average(if(condition1,range1), if(condition2,range2), ...)
In your case:
=average(if(not(iserror(U2:P4)), U2:P4),
if(not(iserror(U4:AG4)), U4:AG4))
PS: Personally, I would avoid the errors within the ranges
in the first place. Makes for a less messy spreadsheet.
|