View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default find averages not including 0's for values not in contiguous rows or columns

Try...

=AVERAGE(IF(MOD(COLUMN(A2:M2)-COLUMN(A2)+0,3)=0,IF(A2:M20,A2:M2)))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Adjust the range
accordingly.

Hope this helps!

In article .com,
"jrozendaal" wrote:

I can find the average omitting 0 values with an array formula if
numbers are in a contiguous row or column:

=AVERAGE(IF(A2:A7<0, A2:A7,""))

BUT

what if my cells to average are A2, D2, G2, J2, M2, etc (every 3
colums) and i don't want to include 0 values?

Thanks,

jrozendaal