How average blank cells w/o error?

  • Thread starter Thread starter Ian Elliott
  • Start date Start date
I

Ian Elliott

I want to average a couple of adjacent cells (c3:c6) that
currently have no data but the user will put in later. If
I put in some other cell:
=AVERAGE(c3:c6)
I get a #DIV/0! error in the cell I typed the formula.
I don't want the #DIV/0! freaking out the user, or
cluttering up on the worksheet, is there a way of turning
off this error so the average will still work when the
user puts something in c3:c6?
Thanks.
 
Ian,

=IF(COUNTA(C3:C6)>0,AVERAGE(C3:C6),"")

Pieter


| I want to average a couple of adjacent cells (c3:c6) that
| currently have no data but the user will put in later. If
| I put in some other cell:
| =AVERAGE(c3:c6)
| I get a #DIV/0! error in the cell I typed the formula.
| I don't want the #DIV/0! freaking out the user, or
| cluttering up on the worksheet, is there a way of turning
| off this error so the average will still work when the
| user puts something in c3:c6?
| Thanks.
 
=IF(ISERROR(AVERAGE(C3:C6)),0,AVERAGE(C3:C6)) to give 0 when all cells empty

or

=IF(ISERROR(AVERAGE(C3:C6)),"",AVERAGE(C3:C6)) to give a blank if all cells empty
 
Back
Top