I have the following formula to calculate the last 3 months' average sales, but it only returns a value of 0. I suspect the issue might be related to COUNTA(2:2), but I'm not sure how to fix it. When I run 'Evaluate Formula,' I can see the correct answer at the second-to-last step, but then it becomes 0. Why is this happening? (I added a + sign at the beginning so that the evaluate steps display the result.)
I have tried the following code, but it only works in Google Sheets, not in Excel. (Not exactly dynamic as I have to change the R2 to the new column every month)
Below is the Google sheet link
Excel Formula:
=+AVERAGE(OFFSET(A2,0,COUNTA(2:2)-3,1,3))
Excel Formula:
=AVERAGE(OFFSET(A2,0,COUNTA(2:2)-3):R2)
Below is the Google sheet link
Untitled spreadsheet - Google Drive
docs.google.com