At some point in the past, I received help here on a formula where I could vary the moving average period on a long row of data.
The data begins on row 8 and ends somewhere below row 2500.
I thought that the formula was this (for cell H18):
=(AVERAGEIF(INDEX(G$8:G$2500,ROW()-$H$3-1):INDEX(G$8:G$2500,ROW()),"<>0")
Where H3 was the moving average period, column G was the data I'm averaging.
I'm checking this formula with manual average (for example if H3=2, then my test formula is
But it is not working. I've tried adjusting the $H$3-1 by various amounts, but I still can't get the right answer. I'm sure the answer is obvious, but that's something I don't always see! 
Thanks
Bookmarks