sum cells with numbers

G

Guest

This shouldn't be too diffacult but I can't seem to find the function that
would allow me to sum the cells with numbers and then divide that by the
number of blank cells.
e.g. cells A1:A5, if A1 is 5, A2 is 10 and cells A3 through A5 are blank
then the answer would be 5. 5+10/3=5
I tried isnumber and isblank but that doesn't work. Any ideas?
 
G

Guest

A play using COUNTBLANK might suffice:
=IF(COUNTBLANK(A1:A5)=0,"",SUM(A1:A5)/COUNTBLANK(A1:A5))
If there's no blank cells, it'll return a blank: ""
 
R

Roger Govier

Hi

Assuming you just want the sum of the numbers if there are no blanks in
the range, then one way would be
=SUM(A1:A5)/MAX(1,COUNTIF(A1:A5,""))
 

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