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
|