VBA Macro to get Last cell

'VBA Macro to  get Last cell
Sub Lastcells1()

Sheets("Sheet1").Range("a1").Select
Selection.End(xlDown).Select
x = ActiveCell.Row + 1
MsgBox x

Sheets("Sheet1").Range("a1").Select
Selection.End(xlToRight).Select
y = ActiveCell.Column + 1
MsgBox y

End Sub

Comments

Popular posts from this blog

Copy diff workbook data in one

'Macro program for Sumif functions or Array

Find lowest value