I'm using this formula to get an average of a column. The # of rows to be averaged is in cell A1:

[CODE]=AVERAGE(INDEX(B:B, ROW() - A$1):INDEX(B:B, ROW()))[/CODE

This is giving me an average, but it is including rows which have a 0 (zero) value. I want to AVERAGEIF(range,">0") so that I'm not including zero value cells in the average formula.


Advice?

Thanks!