Reputation: 45
Using Google Sheets or Excel:
I have columns (B) with Stock symbols, e.g.: B2=GOOG, B3=AAPL, B4= MSFT
I have Sheets named with these same stock symbols respectively. Eg: Sheet2: GOOG, Sheet3: AAPL, etc
I have a formula on Sheet1 that does some computation using data in other sheets. Eg: K2=((GOOG!B2+GOOG!B5)/GOOG!B24)
----I want to automate grabbing the correct sheet name based on column B without manually typing in the sheet name into this formula.----
Is there a way to input the sheet name in this formula K2=((GOOG!B2+GOOG!B5)/GOOG!B24)
based on column B in sheet1?
Conceptually something like K2=((*indirectB2*!B2+*indirectB2*!B5)/*indirectB2*!B24)
In other words, how does one input a sheet name into a formula based on a string in a column
My example image is a tad different than mentioned above but same idea:
Upvotes: 0
Views: 326
Reputation: 45
I solved this using =INDIRECT("'"&B4&"'!$B$2")+INDIRECT("'"&B4&"'!$B$5"))/INDIRECT("'"&B4&"'!$B$24")
Upvotes: 1