return a zero for error
Hi Jerry,
I tried your solution (many thanks) but as there may be blanks in the
range (represented by zero) I get an incorrect average.
Pete
"Jerry W. Lewis" wrote in message
...
If in the workbook this will be repeated many times or involve a much
larger range, then it might recalculate faster to cut out the math
=IF(COUNT(B5:B20),AVERAGE(B5:B20),0)
Jerry
Stefi wrote:
=IF(ERROR.TYPE(AVERAGE(B5:B20))=2,0,AVERAGE(B5:B20 ))
Regards,
Stefi
"Pete Cumberland" ezt írta:
I'm having a problem with a spreadsheet I'm developing which records
average
marks of groups of students over several weeks. I want to display a
"Running Average" of those averages as I enter the data, however,
because I
do this week by week there are inevitably weeks which have not had any
data
entered and her I see the error #DIV/0! for the formula
=AVERAGE(IF(R5:R20<0, R5:R20,"")). I do understand why I'm getting
this
(because I'm dividing by zero) but would like to return a zero so that
the
average of the averages will return a number rather than an error.
Can anybody help me?
Pete
|