BACKGROUND and PROBLEM:
- Sheet1 has a row per record, where each record is a different scenario.
- Each record/row has a column1 which has similar, but slightly different, formulas in it, one per row.
- Each formula contains varied references to multiple NamedRanges.
- Sheet2 would like to lookup a recordID in Sheet1, return the formula for that record, and substitute text "new" for "old" in the NamedRanges.
As far as I can tell, this cannot be done in a function, but would love to be proved wrong.
To date, I've
just copied the formula, and done a find/replace "searching within formulas", but going forward I need this to be done within the formula.
tried to find a way to do
INDIRECT
, but since each formula can be different, that doesn't work.
Substitute returns text and doesn't appear to search within a formula.
Here's an EXAMPLE (https://docs.google.com/spreadsheets/d/1YlNVICaJyw3AdIpiJ7Fhw1TJgOiWd3k-MRGafVXvTjY/edit?usp=sharing)
- I want the formulas in Sheet2 for "Calculation" Column to look up the Record Number in Sheet1, find the formula for that record, replace it, and then substitute "_old" with "_new" in the NamedRanges.
- Note that each formula (for record 1, 2, and 3) are all slightly different
- Note that on Sheet2, some record numbers can be repeated, and the Color/size/inputs vary on Sheet2, but the FORMULA should be the same (except for updating the named ranges)