Macro Copying Rows That Change Dynamically

G

Guest

I'm writing a macro for Excel that will copy large ranges of data and paste
into a new worksheet preserving the historical data. The number of rows to
copy changes dynamically on almost a daily basis.

Is there a function that can be written into a macro to change the range
selectiion each time new data is available. Each row is a transaction record.
 
G

Guest

Dim r as Range, r1 as Range
with worksheets("Destination")
set r = .cells(rows.count,1).End(xlup).row
End with
with worksheets("Data")
set r1 = .Range("A1").CurrentRegion
r1.offset(1,0).copy r(2)
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top