Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting & Copying a Changing Range
Hi All,
I have data that I import on a weekly basis that has a variable numbe of rows, same number of columns that I need a macro to find the end o the new range, select the whole range and copy it. The data will alway start in cell A1 and may be from 3 to 10 rows in length, extending t column K. Any suggestions? Thanks, Don Newto -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting & Copying a Changing Range
Set myRange = Range("A1").Resize(Cells(Rows.Count,"A"),End(xlUp) .Row,numCols) substitute your value for n umber of columns for numcols -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "DNewton " wrote in message ... Hi All, I have data that I import on a weekly basis that has a variable number of rows, same number of columns that I need a macro to find the end of the new range, select the whole range and copy it. The data will always start in cell A1 and may be from 3 to 10 rows in length, extending to column K. Any suggestions? Thanks, Don Newton --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting & Copying a Changing Range
Range("A1").CurrentRegion.Copy Destination:= _
Workbooks("Data").Worksheets("Sheet3").Cells(rows. count,1).End(xlup)(2) -- Regards, Tom Ogilvy "DNewton " wrote in message ... Hi All, I have data that I import on a weekly basis that has a variable number of rows, same number of columns that I need a macro to find the end of the new range, select the whole range and copy it. The data will always start in cell A1 and may be from 3 to 10 rows in length, extending to column K. Any suggestions? Thanks, Don Newton --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying formulas without changing the range | Excel Discussion (Misc queries) | |||
COPYING OFFSET FORMULA WITHOUT THE DATA RANGE CHANGING-DESPERATE | Excel Worksheet Functions | |||
Copying a named range with a changing cell reference | New Users to Excel | |||
Copying Formatting Without Selecting | Excel Programming | |||
Selecting a constant changing Range | Excel Programming |