Sub FindingLastRow()
Dim lastRow As Long
lastRow = ActiveSheet.Cells.SpecialCells(xlLastCell).Row
MsgBox (lastRow)
End Sub?
To find the last column, use the below lines code in the VBA module :
Sub FindingLastColumn()
Dim lastRow As Long
lastColumn = ActiveSheet.Cells.SpecialCells(xlLastCell).Column
MsgBox (lastColumn)
End Sub