I have a script which references the name of a sheet in Google Spreadsheets. When I duplicate a sheet with a cell that uses that function, the function is called right away and returns something like
Copy of Sheet1. When I rename
Copy of Sheet1 to
Sheet2, the function is not called again because the result is cached.
If I pass a parameter like
Today() into the function and simply ignore it, the function will be recalculated every day but that is suboptimal for a couple of reasons:
- I don't need to recalculate that formula every day. I will not be changing the name of the sheets, so I just need it to calculate once.
- I would rather not wait an entire day for the formula to be calculated after duplicating a sheet.
What I would like to do is duplicate a sheet and give it a name before the formulas in the sheet are calculated. Is this possible? If so, how can it be done? If not, do you have any other suggestions?