I am working with an existing financial model workbook that has a whole mess of formulas and cross references. I want to try to get my arms around the dependencies and links between worksheets in the model. I am capable of writing some parsing formulas in excel, but they wouldn't be able to handle multiple sheets in a single formula, or odd and complex placement of single word named tabs (i.e. not bound between single quotes).
Question: Given the text of a formula (e.g. =Inputs!K5), how can I extract the all worksheets that are being referenced in the formula (assume that all formulas only reference to sheets within the current workbook)? Worksheet names may be one word or multiple (thus having/not having single quotes around the name). Worksheet references may be buried pretty deep within nested formulas. It is important to specifically return these results for each cell in question (not just find the aggregate cross references for the sheet).
Example: A1 contains the formula: =VLOOKUP($A3,Inputs!$K$5:$J$20,2,0)+'Rpt Schedule'!$A$3, which returns some value; the desired formula entered in B1 would return the text string: Inputs, Rpt Schedule (also amenable to these being displayed separately in additional columns if easier, e.g. B1 = Inputs, C1 = Rpt Schedule).
Barring a better solution, I'm listing all worksheets along the top and doing a search function to check existence.
Question: Given the text of a formula (e.g. =Inputs!K5), how can I extract the all worksheets that are being referenced in the formula (assume that all formulas only reference to sheets within the current workbook)? Worksheet names may be one word or multiple (thus having/not having single quotes around the name). Worksheet references may be buried pretty deep within nested formulas. It is important to specifically return these results for each cell in question (not just find the aggregate cross references for the sheet).
Example: A1 contains the formula: =VLOOKUP($A3,Inputs!$K$5:$J$20,2,0)+'Rpt Schedule'!$A$3, which returns some value; the desired formula entered in B1 would return the text string: Inputs, Rpt Schedule (also amenable to these being displayed separately in additional columns if easier, e.g. B1 = Inputs, C1 = Rpt Schedule).
Barring a better solution, I'm listing all worksheets along the top and doing a search function to check existence.