ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   creating macros (https://www.excelbanter.com/excel-discussion-misc-queries/219351-creating-macros.html)

garygc

creating macros
 
How do I build a macro to select a cell after the last cell in a column with
data, that will work when the number of rows in a worksheet changes from
worksheet to worksheet?

Sheeloo[_3_]

creating macros
 

With ActiveSheet
lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With

will give you the last filled row in Col A on the active sheet...

"garygc" wrote:

How do I build a macro to select a cell after the last cell in a column with
data, that will work when the number of rows in a worksheet changes from
worksheet to worksheet?



All times are GMT +1. The time now is 03:10 PM.

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