Forum

VBA to copy templat...
 
Notifications
Clear all

VBA to copy template sheet and rename based items in list on master sheet

2 Posts
2 Users
0 Reactions
69 Views
(@kjklady)
Posts: 3
Active Member
Topic starter
 

Help, please? I'm trying to set a macro that will reference a list within a "SiteMaster" worksheet (starting from C6) and create a new copy of a "LibraryTemplate" worksheet for each item in that list, then rename it to match how it is identified in the list. I also should note that the "SiteMaster" sheet will be named with the following pattern: "SiteMaster - Actual Site Name" - so I believe the reference to this master sheet will require a Like statement or wildcard function?

**Bonus ask - would also like this to check if a sheet name already exists, if it does, skip and do not copy/create a new worksheet.

 
Posted : 14/12/2019 10:59 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Katie

Please refer attached.

You will need to select the range of cells containing the list (eg c6:c10) before running the macro

It will create a new sheet from the "LibraryTemplate" sheet for every name in the selected range.

The new sheets will be renamed (including cell B1)

If the sheet already exist, it will not be created.

Hope this helps.

Sunny

 
Posted : 16/12/2019 2:01 am
Share: