Link to home
Create AccountLog in
Avatar of mldaigle1
mldaigle1Flag for Canada

asked on

Excel Macro - Copy / Paste Sheets from one workbook to another

Hello Experts,

I'm sure this is very simple, but need your expertise to do that macro.   I need to copy data from workbookA.SheetIN_Data and paste it into workbookB.SheetIN_Data, starting at cell A2 (Row 1 are my headers in workbookB).

I have a total of 6 sheets that need the data to be transfert from one book to the other (SheetIN_Data,SheetCH_Data, SheetWO_O, SheetWO_B, SheetWO_H, Sheet_PR).

Can you help?
Avatar of Jacques Geday
Jacques Geday
Flag of Canada image

Best and most efficient is you to post both workbooks and will take it from there.
Sub CopySheetData()

Dim wbDest As Workbook
Dim wbSource As Workbook

Set wbSource = ActiveWorkbook
Set wbDest = Workbooks("workbookB")

wbSource.Sheets("SheetIN_Data").UsedRange.Cells.Offset(1, 0).Copy Destination:=wbDest.Sheets("SheetIN_Data").Range("A2")

End Sub

Open in new window

Is the data from all sheets being consloidated into one sheet in the other workbook?
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of mldaigle1


Hi Martin,

This work just fine!!



You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014