Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select Variable Range paste last row + 1
Hello,
Looking for macro solution to perform following 1) Copy Variable Range (A2:C?) from source.xls 2) Paste Range to last row + 1 destination.xls There are many posts concerning but none are performing task needed. Ron de Bruin's solution in posting "copy & paste macro" has come closest but I continually get compile error. Thanks in advance for any assistance. BR, Steven |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select Variable Range paste last row + 1
Dim RngToCopy as range
dim DestCell as range with workbooks("source.xls").worksheets("somesheetnameh ere") set rngtocopy = .range("A2:C" & .cells(.rows.count,"A").end(xlup).row) end with with workbooks("Destination.xls").worksheets("someother sheetnamehere") set destcell = .cells(.rows.count,"A").end(xlup).offset(1,0) end with rngtocopy.copy _ destination:=destcell The code depends on the last used cell in column A for both ranges. SteveT wrote: Hello, Looking for macro solution to perform following 1) Copy Variable Range (A2:C?) from source.xls 2) Paste Range to last row + 1 destination.xls There are many posts concerning but none are performing task needed. Ron de Bruin's solution in posting "copy & paste macro" has come closest but I continually get compile error. Thanks in advance for any assistance. BR, Steven -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select a variable range | Excel Worksheet Functions | |||
Select variable range | Excel Programming | |||
Select a variable range | Excel Programming | |||
Use a Variable to select a range | Excel Discussion (Misc queries) | |||
Select a Range Through a Variable | Excel Programming |