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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Status
Not open for further replies.

Forum statistics

Threads
1,223,956
Messages
6,175,609
Members
452,660
Latest member
Zatman

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