Macro - Varying Range to Copy

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to write a macro to go out to another spreadsheet copy a set of rows,
and paste them into the original spreadsheet. The range to copy will always
start at the same cell, but may vary in length (i.e. a1:g12, and then the
next time a1:g50). Is there a way to do this? Any help would be greatly
appreciate.

Thank You in advance!
 
iEnd = Sheets("Sheet1").Range("A1").End(xlDown).Row
Sheets("Sheet1").Range("A1:G" & iEnd).Copy

Hth,
Merjet
 

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

Back
Top