How average blank cells w/o error?

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.
 
P

Pieter Kuyck

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.
 
K

Ken Wright

=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
 

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.

Ask a Question

Top