I want to duplicate and name multiple copies of a sheet that already has data. The rename would be based on a list from another sheet in the same workbook.
This script does that, but only generates new blank sheets. Can this be modified to duplicate and rename vs make a blank sheet and name?
Sheet to duplicate in this instance is "FO_VFX_010" but if that could be any name, even better.
The sheet with the names is labeled as is "All_shots" the column is A rows 2- whatever.
Here's the existing code from someone else's post.
function onOpen() {
SpreadsheetApp.getUi().createMenu('My Menu')
.addItem('Create New Tabs', 'createTabs')
.addToUi()}
function createTabs() {
var ss = SpreadsheetApp.getActive()
ss.getSheetByName('Names').getRange('A:A').getValues().filter(String)
.forEach(function (sn) {
if (!ss.getSheetByName(sn[0])) {
ss.insertSheet(sn[0], ss.getSheets().length);}})}