ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last Cell (https://www.excelbanter.com/excel-programming/398068-last-cell.html)

Little Penny[_3_]

Last Cell
 
How do I select cell L4 to last cell?

joel

Last Cell
 
Sub test()

LastRow = Cells(Rows.Count, "L").End(xlUp).Row
LastCol = Cells(4, Columns.Count).End(xlToLeft).Column
Set MyRange = Range("L4", Cells(LastRow, LastCol))
MyRange.Select
End Sub
"Little Penny" wrote:

How do I select cell L4 to last cell?



All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com