calculating average with blank cells

M

marvinks

Hi
I have 4 columns with an average function on the bottom, however no
all the columns are used all the time, resulting in an error (#DIV/0!)
How do I calculate the average only if the cells are used. If I don'
used one of the columns I would like it to stay blank or return 0
thanks
marvi
 
S

starguy

enter following formula at the bottom of your columns instead of simpl
AVERAGE function.
suppose your data is in col A range(A1:A50), you should change thi
range for each column.

=IF(ISERROR(AVERAGE(A1:A50)),"",AVERAGE(A1:A50))
 
S

Scoops

marvinks said:
Hi
I have 4 columns with an average function on the bottom, however not
all the columns are used all the time, resulting in an error (#DIV/0!).
How do I calculate the average only if the cells are used. If I don't
used one of the columns I would like it to stay blank or return 0
thanks
marvin

Hi marvinks

Try:

=IF(ISERR(AVERAGE(A1:A4)),0,AVERAGE(A1:A4))

Adjust ranges as necessary.

Regards

Steve
 

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