I think the answer from W5ALIVE is closest to what I use to find the last row of data in a column. Assuming I'm looking for the last row with the data in column A, I would use the following for a more general search:
=MAX(IFERROR(MATCH("*",A:A,-1),0),IFERROR(MATCH(9.99999999999999E+307,A:A,1),0))
The first MATCH will find the last text cell, and the second MATCH will find the last numeric cell. The IFERROR function returns zero if the first MATCH finds all number cells or if the second match finds all text cells.
This is basically a small variation of the W5ALIVE mixed text and number solutions.
When testing time, it was significantly faster than the equivalent variations of LOOKUP.
To return the actual value of this last cell, I prefer to use indirect cell binding as follows:
=INDIRECT("A"&MAX(IFERROR(MATCH("*",A:A,-1),0),IFERROR(MATCH(9.99999999999999E+307,A:A,1),0)))
The method suggested by sancho.s may be a cleaner option, but I would change the part that finds the line number:
=INDEX(MAX((A:A<>"")*(ROW(A:A))),1)
the only difference is that ", 1" returns the first value, and ", 0" returns the entire array of values (all but one that are not needed). I still prefer to access the cell's index function there, in other words, return the cell value with:
=INDIRECT("A"&INDEX(MAX((A:A<>"")*(ROW(A:A))),1))
Great topic!