Copy From one Workbook, Paste into Another, Copy, Paste into yet Another Workbook, Save As , repeat - Help Needed!

polyzp

New Member
Joined
Sep 19, 2014
Messages
1
File I have : template.xml , 1.xml, 2.xml, 3.xml, ....., 100.xml, blank.xml

File I want to end up with 100 files : ~cell value in A2~.xml for each of 1.xml, 2.xml, 3.xml, ....., 100.xml

---

1) I need to 'copy' a cell range AQ1 to CD78 (box 1) from file template.xml

2) I then need to 'paste' at cell BA2 in file 1.xml. I need to 'copy' this (box 2) - (which is made up of rearranged values pulled from other cells in 1.xml).
The exact cell range of box2 in 1.xml is BA2 to CJ79. Again, I need to 'copy' this (box 2).

3) The next step is now to 'paste special - only values' at cell A1 in file blank.xml, which has prior formatting, and 'Save-As' a new file with filename = ~cell value in A2~.xml

4) Rinse and Repeat Steps 1-3 but for files 2.xml,3.xml,4.xml,5.xml,....,100.xml

5) I should end up with 100 xml files : ~cell value in A2~.xml for each of 1.xml, 2.xml, 3.xml, ....., 100.xml

Assuming everything mentioned is just on the C drive, and that only sheet 1 is being used in each xml file,

How Can I automate this process without having to do it manually?

This link has something similar : excel vba - Copying range and pasting into new workbook - Stack Overflow

But I need this repeated for many files!

Any help would be greatly appreciated! Thanks!

-Panos-


 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,191,668
Messages
5,987,947
Members
440,121
Latest member
eravella

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top