write at exceltoexplore@gmail.com : Report Automation|Dashboard in Excel| Provide Excel consulting through macro (VBA) automation |Financial Modeling | Ethical Hacking

Sunday, 12 June 2011

To Find the last used row & column

Sub LastRC()

Dim LR, LC
LR = Cells(Rows.Count, 1).End(xlUp).Row
LC = Cells(1, Columns.Count).End(xlToLeft).Column
MsgBox LR
MsgBox LC
End Sub

No comments:

Post a Comment