Help with Macro (copying data from multiple workbooks)

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

Guest

All,

How can I set up a macro which copies data in the same column and cell but
from different workbooks or worksheets.....

Thanks

Tim
 
Tim,

This example will copy the data from range A1:A6 from Sheet1 to Sheet2
within the same workbook:

Sub CopyRange1()
Range("A1:A6").Copy
Sheets("Sheet2").Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub

This example will copy the data from range A1:A6 from Sheet1 in Book1 to
Sheet1 in Book2:

Sub CopyRange2()
Range("A1:A6").Copy
Windows("Book2").Activate
Sheets("Sheet1").Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
 

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