Selection of the last 12 rows in a table
Solved
massimo888
Posted messages
209
Status
Member
-
massimo888 Posted messages 209 Status Member -
massimo888 Posted messages 209 Status Member -
Hello,
I have a table that is dynamic and continuously adds new data. I would like to retrieve only the values from the last 12 rows.
Is this feasible?
Thank you
Sincerely.
Sam
I have a table that is dynamic and continuously adds new data. I would like to retrieve only the values from the last 12 rows.
Is this feasible?
Thank you
Sincerely.
Sam
4 answers
-
Hello
your data in column A, to calculate the average of the last 12
=AVERAGE(OFFSET(A1,COUNTA($A:$A)-1,0,-12,1))
Best regards
corrected formula -
Hello
without your model, just a principle to adapt assuming that column A on sheet1 (or another) of your table has no empty cells interspersed:
to edit the last 12 values of column A in sheet2 A2:
=OFFSET(sheet1!$A$1,COUNTA(sheet1!A:A)-12+ROW()-2,)
to get the value of A and drag down to row 13 to get the total
the same formula to edit B
but with:
=OFFSET(sheet1!$A$1,COUNTA(sheet1!A:A)-12+ROW()-2,1)
;2) for C, etc...
Note
__COUNTA can refer to any filled column
__pay attention to the $ signs on $A$1
__=ROW()-2 must give 0 on the row where the 1st formula is located)
__the -12 should be adjusted depending on whether A starts in A1 or A2, with or without a title, etc...
best regards
To err is human, to persist is diabolical. -
-
An example could be
http://www.cjoint.com/c/EFDnexHDzFg
Best regards