This code finds the last used row in a specific column in the active worksheet.
VBA Code:
Sub FindLastRow()
Dim lastRow As Long
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
MsgBox "Last Row: " & lastRow
End Sub
This code finds the last used row in a specific column in the active worksheet.
VBA Code:
Sub FindLastRow()
Dim lastRow As Long
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
MsgBox "Last Row: " & lastRow
End Sub