View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
marius marius is offline
external usenet poster
 
Posts: 1
Default formula for avarage with a variable divider

Here is the scenario:

I have a column of 12 cells. Originally, I needed to
calculate the column avarage and I did this: SUM
(A1:A10)/12. Now, some of these cells are zeros and I need
to calculate the column avarage excluding them. let's say
that out of the 12 cells 3 are zeros. my formula would be:
SUM(A1:A10)/9. Because the number of cells that have zeros
is always changing I need a formula that identifies the
cells with zeros, subtracts it from 12 and divides the sum
to it.

Thank you