Google Sheets: Detecting and Responding to Newly Added or Renamed Tables

I’m currently managing a Google Drive spreadsheet that features a primary sheet called Name index, which lists individuals who have signed in at a location with available notebooks. This main sheet also computes various statistics.

Other sheets correspond to the specific names associated with these notebooks. The name index facilitates reference without manual entry.

I anticipate that we will not create more than 255 sheets, but I have a concept for automating the process:

1) A new sheet can be added, prompting the spreadsheet to recognize it.
2) Depending on the situation:
   2.1) If the new sheet is renamed, the `Name index` will automatically designate a free column with the new sheet's name.
   2.2) If an existing sheet is renamed, the corresponding column in the `Name index` will reflect the sheet's previous name.

I’ve been reviewing the available documentation, but it’s not well organized, leading me to search elsewhere for insights.

You can use Google Apps Script to automate this. Set a trigger “onEdit” event to detect changes like renaming sheets. Within this function, update your Name Index automatically. This can help your spreadsheet dynamically keep up with new and renamed sheets without manually editing. It’s a bit of coding, but effective.