开发者

How to copy data from another workbook and paste onto related group rows?

开发者 https://www.devze.com 2022-12-26 05:38 出处:网络
How do I copy data from all the workbooks in the folder onto workbook 1 into it\'s corresponding row groups?

How do I copy data from all the workbooks in the folder onto workbook 1 into it's corresponding row groups?

The attached images shows the sample worksheet is the file I want to paste data into (main template) and wb2 sample is a sample of one of the worksheets in the folder 开发者_C百科that I want to copy data from.

As you can see, the workbook 2 does not include all of the tasks. So I need to copy all of the data from workbook 2 and paste it on the corresponding row group (col A) on original workbook. I then need to do this for all workbooks in the folder.

Any help would be most appreciated!


To get the list of files, you will need to modify the code provided in this answer: http://www.ozgrid.com/forum/showthread.php?t=65530 (you will need to read some documentation to select only xls files)

To open each of those files, read the documenation on opening files. This url can get you started: http://p2p.wrox.com/excel-vba/10510-opening-excel-file-vba.html

After that, you will need to copy data from one workbook to another. See this url: http://www.ozgrid.com/forum/showthread.php?t=18728

I know this isn't a very complete answer, but your question isn't terribly clear.

0

精彩评论

暂无评论...
验证码 换一张
取 消