Function FindLastRow()
Dim LastRow As Long
If WorksheetFunction.CountA(Cells) > 0 Then
'Search for any entry, by searching backwards by Rows.
LastRow = Worksheets("data").Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
FindLastRow = LastRow
End If
End Function
Find Last used row in a Worksheet
Previous post: Find Last Column used in a Worksheet
Next post: Excel – Create New Worksheet