VBA code to create new sheet from choice of templates based on cell value in a cell range.

Status
Not open for further replies.

BokiRis

New Member
Joined
Sep 8, 2019
Messages
10
Hello Forum,
I have exhausted every effort in searching all over different forums for a solution to my predicament. I would be eternally grateful to anyone that can find a solution to my issue.:(

This is what I’m trying to accomplish:


  • I have one master sheet called “Master”
  • There are six different template sheets called “AI Template”, “AO Template”, “AIAO Template”, “DI Template”, “DO Template”, and “DIDO Template
  • In the Master sheet, for cells in cell range B12:N12 there are six different value options (SPARE, ECOM, AI, AO, AIAO, DI, DO, and DIDO
  • Also, In the Master sheet, cells in cell range B13:N13 will contain the names of the new sheets created from the templates.

If it is possible, I would like to, based on the cell value in cell range B12:N12 make a copy of the corresponding template and rename it a corresponding name as derived from cell range B13:N13. One caveat is, I do not want to create any additional sheets if the value in the cell range B12:N12 is blank, SPARE, or ECOM

For additional clarification this would be an example of how it should work:

If cell B12 contains AI, insert copy of the AI Template sheet and rename it the value of cell B13. Furthermore, if C12 is AO, then insert copy of AO Template sheet and rename it the value of cell C13 and so on.
Thank you in advance!!!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Status
Not open for further replies.

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

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