ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy range from workbooks into one master sheet (https://www.excelbanter.com/excel-programming/426157-copy-range-workbooks-into-one-master-sheet.html)

J.W. Aldridge

Copy range from workbooks into one master sheet
 
Hi.

I have a folder that only contains 10 excel workbooks. I would like to
automatically open each folder, copy all data A5:J (whereever the data
ends) and paste into the open workbook (the one running the macro) on
the current page ("data") starting at a5 on down, then close the
folder it was copied from.

The location of the first workbook (of ten) is:
C:\Documents and Settings\1234\Desktop\09ABI\[Stuff1.xls]

thanx

Ron de Bruin

Copy range from workbooks into one master sheet
 
Try the first macro on this page
http://www.rondebruin.nl/copy3.htm

And change this code lines
Set BaseWks = Workbooks.Add(xlWBATWorksheet).Worksheets(1)
rnum = 1

To

Set BaseWks = ActiveWorksheet
rnum = 5


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"J.W. Aldridge" wrote in message
...
Hi.

I have a folder that only contains 10 excel workbooks. I would like to
automatically open each folder, copy all data A5:J (whereever the data
ends) and paste into the open workbook (the one running the macro) on
the current page ("data") starting at a5 on down, then close the
folder it was copied from.

The location of the first workbook (of ten) is:
C:\Documents and Settings\1234\Desktop\09ABI\[Stuff1.xls]

thanx

__________ Information from ESET Smart Security, version of virus signature database 3970 (20090327) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus signature database 3970 (20090327) __________

The message was checked by ESET Smart Security.

http://www.eset.com




J.W. Aldridge

Copy range from workbooks into one master sheet
 
Thanx...

How to change Worksheets(1) to all worksheets in workbook (except the
last)
Or
Worksheets Sun, Mon, Tue, Wed, Thu, Fri & Sat

Ron de Bruin

Copy range from workbooks into one master sheet
 
Use the code here
http://www.rondebruin.nl/fso.htm

Or use my Merge add-in
http://www.rondebruin.nl/merge.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"J.W. Aldridge" wrote in message
...
Thanx...

How to change Worksheets(1) to all worksheets in workbook (except the
last)
Or
Worksheets Sun, Mon, Tue, Wed, Thu, Fri & Sat

__________ Information from ESET Smart Security, version of virus signature database 3972 (20090328) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus signature database 3972 (20090328) __________

The message was checked by ESET Smart Security.

http://www.eset.com





All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com