Last Cell Selection Methods
VBA Code to Select All used Rows and Column in a sheet?
'ThisWorkbook.Sheets("Sheet1").UsedRange.Select
'ThisWorkbook.Sheets("Sheet1").Range("a1").CurrentRegion.Select
VBA Code to Select Last Used Cell of Row?
Selection.End(xlDown).Select
Range("A100000").End(xlUp).Select
VBA Code to Select Last Cell of Row?
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
‘or
Range(Range("A100000").end (xlup)).select
Range(Selection, Selection.End(xlup)).Select
VBA Code to Select Last Used Cell of Column?
Selection.End(xltoRight).Select
Range("XFD1").End(xltoleft).Select
VBA Code to Select Last Cell of Column?
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range("XFD1").End(xlToLeft).Select
Range(Selection, Range("a1")).Select
Comments
Post a Comment