copy and paste multiple ranges from multiple tabs in old wkbk to new addresses in multiple tabs in new wkbk

BonnieM

Board Regular
Joined
Nov 3, 2014
Messages
71
I have a multi tab template which has been significantly revised. I need to migrate the data from about 500 files of the old template to the new one. This would involve copying and pasting multiple ranges from multiple tabs in old workbook to multiple tabs in the new workbook. (probably about 20-30 groups of data) The new template cell address would be different than the cell range being copied from. Also, it is possible that rows or columns may be hidden in some of the old files, so I think we need to unhide them first.

I am a beginner at macros, but trying to learn on my own.

What I need for this forum is a block of code to do 2 or 3 ranges with comments to tell me how to edit to add the remaining blocks.

I would expect the macro to reside in a separate workbook. I could easily have both the new template and the old file open at the time of running the macro, so no need to build locate file info into the macro. but I don't know how to identify the 2 files - the new template would have a static name, for example "new template", but the old files would all have different names.

Example:

First unhide all columns and rows in each tab of the old template

Copy cell range b2..b30 from oldtab2 in old template to cell c5 in newtab2 in new template

Copy cell range c2..c30 from oldtab2 in old template to cell d5 in newtab2 in new template

Copy cell range b2..b22 from oldtab3 in old template to cell b4 in newtab3 in new template

Indicate completion with message: "Migration done, save as new file"

This is a time sensitive project so any help would be greatly appreciated!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,223,630
Messages
6,173,454
Members
452,514
Latest member
cjkelly15

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
Back
Top