average range of cells with zero and blanks

L

Lisa

Hello
I need to average a range of cells where there are blanks and zero’s and
both have meaning. I’ve used a generic formula =average(b21:b27) which works
with the exception of when there is a range of seven days of no data (looks
blank). The desired result would have the result be blank but I receive
#DIV/O for an error. Can you please help?
 
S

Sandy Mann

=IF(COUNT(B21:B27)=0,"",AVERAGE(B21:B27))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

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