Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9707

Duplicate and rename vs make a blank sheet and name

$
0
0

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);}})}

Viewing all articles
Browse latest Browse all 9707

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>