I have got this code that makes me a new worksheet where the name of the new worksheet is based off of the value in a worksheet named Questionnaire, "C1". After this new worksheet is made, I want to copy the contents from Questionnaire "A1:B16" and paste in this new worksheet "A1:B16". I will be doing this for lots of different new worksheet names so the final code will have to adapt to the new worksheet name each time.
function GenerateName() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var newSheet = sheet.getRange("C1").getValue();
sheet.insertSheet(newSheet);
}
