You can use this, but it is very slow:
Sub LastRowWithNonNullData()
Dim LastRow As Variant, i As Long
For i = Rows.Count To 1 Step -1
If Cells(i, "A").Value <> "" Then
MsgBox i
Exit Sub
End If
Next i
End Sub
This is not quite as slow:
Sub IsThisAnyBetter()
MsgBox Evaluate("IF(COUNTA(A:A)=0,"""",MAX((A:A<>"""")*(ROW(A:A))))")
End Sub
Both will ignore Nulls at the bottom of column A. If you use the argument to Evaluate() directly in a worksheet cell, it must be array-entered.
EDIT#1:
Both subs work on column A. Say we want to modify the formula in the second sub to work on column 77 (that is column BY). Here is a way to do it:
Sub AnyColumn()
Dim s1 As String, s2 As String, iCol As Long, iColAlpha As String
Dim s3 As String, s4 As String, s5 As String
iCol = 77
s1 = "IF(COUNTA(A:A)=0,"""",MAX((A:A<>"""")*(ROW(A:A))))"
s2 = Cells(1, iCol).Address(0, 0)
s3 = Left(s2, Len(s2) - 1)
s4 = s3 & ":" & s3
s5 = Replace(s1, "A:A", s4)
MsgBox s5
End Sub
EDIT#2:
The formula I used in Evaluate() was adapted from Chip Perason