View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default "Average" Function in Excel

Can you change the original formulas in those cells?

I'm guessing that you have formulas like:
=sheet2!a1

If you replace those formulas with:
=if(sheet2!a1="","",sheet2!a1)

The cells will look blank when the "sending" cells are empty.

And =average() won't include them.

You could write your formula to ignore the cells with 0's in them. But what
happens if the sending cell really had a 0 in it? You average would be
incorrect.

If you wanted to average the non-zeros in a range:
=sum(a1:a10)/countif(a1:a10,"<"&0)

(adding 0 to the sum won't hurt, so I didn't bother to exclude them.)





ClintonOrlando wrote:

Hi there.
I'm having difficulty getting a cell to accurately show an average of
specific cells with values. it is counting all of the zeros in the column
and I can't figure out how to make the cell not show zeros without going
through and deleting each one (hundreds!). (The cells I'm averaging have
formulas in them where they're copies from other cells and when those
original cells are empty, these cells then show a "0.00")


--

Dave Peterson