find averages not including 0's for values not in contiguous rows or columns

J

jrozendaal

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
 
D

Domenic

Try...

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

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

Hope this helps!
 

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

Top