I have a specific task that I believe might require some kind of custom script.
Here is (a copy) of the spreadsheet in question: https://docs.google.com/spreadsheets/d/1fwk-I3VHIeQP4AC4J-vQB8vbuM3YONgCfTTSrDSNhz8/edit#gid=850165930
This spreadsheet is a template for designing the content model of a piece of software. As such, users will be copying the Sheet entitled "—" depending on the configuration of their project.
My question refers to Column C across all of these pages, entitled "Bound Values". I need some way for all variables within this column (across all pages) to be printed within a single column on a hidden sheet (represented by the sheet titled "🌴").
End Goal
Whenever editing cells in the "Bound Values" column, I would like to have the option of selecting previously used variables within this column across other pages.
I can currently only do this by referencing a single, static sheet that I would need to manually update (which is time consuming).
Another way of looking at it
I would use this on the hidden sheet to scrape all cell values across all pages in column C:
My Questions Are:
- How might one be able to do this in Google Sheets, if at all?
- If not, how might a script be structured to achieve this?
Best Answer
If the names of sheets were known, you'd be able to do something like
to join all of those together.
But since new Sheets will be added, and you don't know what names they will have, you need a script. I can think of two approaches: (a) the script will collect the data from C-columns itself; (b) the script will update the formula (of the above form) that will do the rest. The second one seems easier to code so I'll go with that.
To deploy:
You may want to add a sheet yourself to make the script run the first time; after that it will update the formula in cell C1 of sheet 🌴 whenever a new sheet is added or a sheet is removed.
In case of renamed sheets, the software takes care of renaming itself, adjusting the formula automatically.