Formula problem

  • Thread starter Thread starter JE McGimpsey
  • Start date Start date
Thank you. Worked like a charm.
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
 
Peter

Why not =AVERAGE(B2:H2) which ignores blanks.


Gord Dibben Excel MVP
 
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.
 

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

Similar Threads

Modify range in VBA 9
Excel formula, sum the value cell and if empty cell left blank 0
#REF with vlookup 1
How Accumulate the Values? 5
VLOOKUP returns #N/A 9
#REF error with Vlookup 1
#div/0! 4
IF AND formula 5

Back
Top