
=LOOKUP(2,1/(A:A<>""),A:A)
Related formulas
Get date associated with last entry
Get last entry by month and year
Get first non-blank value in a list
Lookup latest price
Last row in numeric data
Last row in text data
If you need find the value of the last non-empty cell in a row or column, you can use the LOOKUP function in this surprisingly compact formula. As an additional bonus, this formula is not an array formula, and not volatile.
The key to understanding this formula is to recognize that the lookup_value of 2 is deliberately larger than any values that will appear in the lookup_vector.
If there are errors in the lookup_vector, particularly if there is an error in the last non-empty cell, this formula needs to be adjusted. This adjustment is needed because <>"" criteria will return an error itself if a cell contains an error. To workaround this problem, use ISBLANK with NOT:
=LOOKUP(2,1/(NOT(ISBLANK(A:A))),A:A)
To get the last numeric value, you can add the ISNUMBER function like this:
=LOOKUP(2,1/(ISNUMBER(A1:A100)),A1:A100)
If you want to get the position (in this case row number) of the last value, you can try a formula like this:
=LOOKUP(2,1/(A:A<>""),ROW(A:A))
Here we feed the row numbers of the same range into lookup for the result vector and get back the row number of the last match.

=LOOKUP(2,1/(A:A<>""),A:A)
Related formulas
Get date associated with last entry
Get last entry by month and year
Get first non-blank value in a list
Lookup latest price
Last row in numeric data
Last row in text data
If you need find the value of the last non-empty cell in a row or column, you can use the LOOKUP function in this surprisingly compact formula. As an additional bonus, this formula is not an array formula, and not volatile.
The key to understanding this formula is to recognize that the lookup_value of 2 is deliberately larger than any values that will appear in the lookup_vector.
If there are errors in the lookup_vector, particularly if there is an error in the last non-empty cell, this formula needs to be adjusted. This adjustment is needed because <>"" criteria will return an error itself if a cell contains an error. To workaround this problem, use ISBLANK with NOT:
=LOOKUP(2,1/(NOT(ISBLANK(A:A))),A:A)
To get the last numeric value, you can add the ISNUMBER function like this:
=LOOKUP(2,1/(ISNUMBER(A1:A100)),A1:A100)
If you want to get the position (in this case row number) of the last value, you can try a formula like this:
=LOOKUP(2,1/(A:A<>""),ROW(A:A))
Here we feed the row numbers of the same range into lookup for the result vector and get back the row number of the last match.