title: How to auto create Sheet Name based in names in column A in Sheet1 in google spreadsheet?
body: <p>I'm still learning GoogleApp scripting by myself. Can anyone guide me in the right direction how to edit the below script in such a way that instead of naming the new sheet as per the current date, it takes the names from the column A of Sheet1 and then rename it.</p>
  
  <p>Note that i keep on updating column A with new name in new cells down the column off an on.</p>
  
  <p>Thank you for your help in advance!</p>
  
  <p>This is the script I have which works for dates only:</p>
  
  <pre><code>function onOpen() {
  var menu = [{name: "Add", functionName: "newSheet"}];
  SpreadsheetApp.getActiveSpreadsheet().addMenu("Sheet", menu);
  }
  
  function newSheet() {
  var sheetName = formatDate();
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var templateSheet = ss.getActiveSheet();
  ss.insertSheet(sheetName, ss.getSheets().length, {template: templateSheet});
  }
  
  function formatDate() {
  var month, day, d = new Date();
  month = ('0'+(d.getUTCMonth()+1)).slice(-2);
  day = ('0'+d.getUTCDate()).slice(-2);
  return d.getUTCFullYear()+'-'+month+'-'+day;
  }
  </code></pre>