MACRO: Reorganizing sheets from multiple workbooks, retitling and saving. Objects defined in master wb

RUSTYATVBA

New Member
Joined
Feb 25, 2018
Messages
1
I am new here so please bear with me. My career has taken me away from VBA and I am now very rusty.

Every month we take 1 sheet from 3 different files and create specific project files. The sheets are renamed and the new project files are saved in a specific location.

In plain English, Copy sheet A1 from Book A to new book "P1" and rename sheet "A Data", Copy sheet B1 from Book B to "P1" and rename sheet "B Data", Copy sheet C1 to from Book C to book "P1" and rename sheet "C Data", Save file to location specified (column G) and name new workbook as "01". Repeat until last row is complete.

The goal of using the master sheet is all objects can be changed on this sheet and the code does not have to be updated.

Here is the master sheet:

[TABLE="width: 1132"]
<tbody>[TR]
[TD]Source Folder:
[/TD]
[TD]C:\Users\RUSTYATVBA\Desktop\Testing\Book A.xlsx
[/TD]
[TD]C:\Users\RUSTYATVBA\Desktop\Testing\Book B.xlsx
[/TD]
[TD="colspan: 2"]C:\Users\RUSTYATVBA\Desktop\Testing\Book C.xlsx
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]File:
[/TD]
[TD]Book A.xlsx
[/TD]
[TD]Book B.xlsx
[/TD]
[TD]Book C.xlsx
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]New Sheet Name:
[/TD]
[TD]A Data
[/TD]
[TD]B Data
[/TD]
[TD]C Data
[/TD]
[TD]Month:
[/TD]
[TD]Project:
[/TD]
[TD]Save location:
[/TD]
[/TR]
[TR]
[TD]Sheet look up:
[/TD]
[TD]A1
[/TD]
[TD]B1
[/TD]
[TD]C1
[/TD]
[TD]01
[/TD]
[TD]P1
[/TD]
[TD]C:\Users\RUSTYATVBA\Desktop\Save\P1
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A2
[/TD]
[TD]B2
[/TD]
[TD]C2
[/TD]
[TD]01
[/TD]
[TD]P2
[/TD]
[TD]C:\Users\RUSTYATVBA\Desktop\Save\P2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]A3
[/TD]
[TD]B3
[/TD]
[TD]C3
[/TD]
[TD]01
[/TD]
[TD]P3
[/TD]
[TD]C:\Users\RUSTYATVBA\Desktop\Save\P3
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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