J
JE McGimpsey
One way:
=IF(COUNT(B2:H2)>0,AVERAGE(B2:H2),"")
=IF(COUNT(B2:H2)>0,AVERAGE(B2:H2),"")
JE McGimpsey said:One way:
=IF(COUNT(B2:H2)>0,AVERAGE(B2:H2),"")
Peter McCaul said:I have an excel sheet that details store sales with 7 columns of numbered
data. I would like to make an 8th column that gives me the average of
the
first 7 columns but not every cell has a number. My average formula
could
read @sum(b2..h2)/7. If one of the cells in the row doesn't have a
number
in it, I would like the average formula to read @sum(b2..h2)/6. Some of
the
rows may have only 2 numbers in it cells so in that case it would have to
be
divided by 2.
I would like to know if anyone can help me to devise a formula that will
automatically do this? Any help is greatly appreciated. Thank you.
begin 666 p.gif
[Image]
end
Gord Dibben said:Peter
Why not =AVERAGE(B2:H2) which ignores blanks.
Gord Dibben Excel MVP