Average Cells with actuall numbers

B

Bradley

Hey all,
Hopefully this is a simple one. I'm SUMing a column:
=SUM(L8 + L12 + L16)

At times, some of these cells might be empty. Can I mod this equation to
check for an empty cell?

What I'm doing is averaging the numbers in this column by the number of
cells that actually have numbers in them. (in this case it would be the
sum of L8 + L12 + L16 divided by 3) If, let's say, L8 was empty, I need
to divide the total by 2.

Make any sense?

Thanks for any help!

-b
 
J

JulieD

Hi Bradley

couple of things
=SUM(L8+L12+L16) is quite an awkward way of writing either =L8+L12+L16 or
=SUM(L8,L12,L16)
secondly there's an AVERAGE function that does what you want without you
having to worry about blank cells
try
=AVERAGE(L8,L12,L16)

Cheers
JulieD
 
B

Bob Phillips

Bradley,

Why not just use

=AVERAGE(L8,L12,L16)

which automatically accounts for blanks.

BTW you don 't nee =SUM(L8+L12+L16) as SUM and + do the same thing. You only
need
=SUM(L8,L12,L16) or =L8+L12+L16

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
B

Bradley

jeff said:
Hi,

Why not use the Average function? It knows what
to divide by..

jeff


this equation to


by the number of


it would be the


was empty, I need
Thanks all!
-b
 
Top