If there are no holes in your data, this code will return the rows on the active sheet.
Code:
Public Sub FindLastRow()
Dim iRow As Long
iRow = 1 'row that data starts
Do While Len(Range("A" & iRow).Text) > 0
iRow = iRow + 1
Loop
iRow = iRow - 1
MsgBox iRow & " Rows of Data"
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.