Sub LastUsedRow_UsedRange_1()
Dim lastRow As Long
lastRow = ActiveSheet.UsedRange.Row - 1 + ActiveSheet.UsedRange.Rows.Count
MsgBox lastRow
End Sub
Sub LastUsedRow_UsedRange_2()
Dim lastRow As Long
lastRow = ActiveSheet.UsedRange.Rows(ActiveSheet.UsedRange.Rows.Count).Row
MsgBox lastRow
End Sub
No comments:
Post a Comment