Last several values in a column

M

Mike K

Oh Wise Ones,

The below array formula finds the average of the last 5
values in a column. How do I modify it to display the last
5 values of the column?

=AVERAGE(A65535:INDEX(A1:A65535,LARGE(ROW(1:65535)*
(A1:A65535<>""),5)))

Thanks,
Mike
 
D

Domenic

Try the following...

B1, copied down:

=INDEX(A:A,LARGE(IF($A$1:$A$65535<>"",ROW($A$1:$A$65535)),ROW()-ROW($B$1)+1))

or for the reverse order...

=INDEX(A:A,LARGE(IF($A$1:$A$65535<>"",ROW($A$1:$A$65535)),ROW($B$6)-ROW()))

Both these formula need to be confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top