ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting ranges (https://www.excelbanter.com/excel-programming/307839-selecting-ranges.html)

Steve Wood

Selecting ranges
 
I am a new user of macros. Excel 2002.
I need to select all cells in a range from cells A2:L2 down to the last row
in column active cell in column A. The number of active cells in Column A
varies in the 35 worksheets I have to gather information from. I then need to
paste the contents into another workbook. Any suggestions would be welcomed.
TIA

Tom Ogilvy

Selecting ranges
 
With activeSheet
.range(.cells(2,1),.Cells(rows.count,1).End(xlup)) .Resize(,12).copy _
Destination:=Workbooks("Book2.xls").Worksheets(1). Range("A1")
End With
--
Regards,
Tom Ogilvy

"Steve Wood" <Steve wrote in message
...
I am a new user of macros. Excel 2002.
I need to select all cells in a range from cells A2:L2 down to the last

row
in column active cell in column A. The number of active cells in Column A
varies in the 35 worksheets I have to gather information from. I then need

to
paste the contents into another workbook. Any suggestions would be

welcomed.
TIA





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

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