I know there's a way to do an averageif array formula. But what about if the cells I'm concerned with aren't adjacent to each other:

In other words: I want to average all my subtotals in a column if they are not 0:

A1 1
A2 2
A3 2
A4 5 (subtotal)
A5 3
A6 3
A7 6 (subtotal)
A8 3
A9 3
A10 2
A11 8 (subtotal)
A12 0
A13 0
A14 0
A15 0 (subtotal)
A16 2
A17 2
A18 4 (subtotal)

I cannot sort this row, or adjust its formatting in any way. I want a formula that would result in 23/4 = 5.75 (23 is 5+6+8+4) and (4 is the # of subtotals >0)

I was thinking something along the lines of:
{average(if(A4,A7,A11,A15,A18<>0,A4,A7,A11,A15,A18,False))}, but I don't think that works

Thanks for your help........
Moe