The best solution to this depends on many conditions. Among those are:
What type of data is in the range, is it text or numeric, or can it be both?
Are there any empty/blanks cells *within* the range?
Are there any formulas in the range that might return formula blanks?
As a starting point you can try something like this. Assumes no empty/blank
cells within the range:
=IF(COUNTA(A1:A10),INDEX(A1:A10,COUNTA(A1:A10)),"")