I have a list of names of the members of my group. Each member has a separate sheet that contains information on that member. When a new person joins the group, I input the name to the master list and duplicate a template so that person will have a separate info sheet. Cell A1 imports (importrange)the member's name. I want automate the tab name change on the member info sheet. This facilitates a single input point for the member's name. I have attempted a script recommended on StackExchange:

function onEdit() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var oldName = sheet.getName();
  var newName = sheet.getRange(1,1).getValue();
  if (newName.toString().length>0 && newName !== oldName) {

This script does not change the tabname, I think because the name is being imported from another sheet.


The edit event only occurs when a user directly makes an edit to cells on the spreadsheet. Changes on values due to a recalculation of a formula or made by a script doesn't triggs the onEdit() function.

You should trigger it by other means.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.