Creating Formula with Embedded Variable ID

C

Chris

I need to create a single formula for my workbook that references cells from various tabs (over 20) in another workbook.
I want to copy this formula into multiple tabs within my workbook.
My workbook and the external workbook have the same number of and identically named tabs.
I want to embed a variable into the formula that will take on the name of the tab that the formula is copied to.

I imagine the formula would look something like this:
='K:\Sales Reports\[Ohio Team, Mar-21-2004.xls]variable_identifying_the_tab_goes_here'!D1

I know I can use the following formula to derive the file name
(thanks to Frank Kabel of this discussion group for that tip

=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1),1)

but I'm having problems plugging it into the formula properly.

Second issue, I also would like to embed text into this formula that comes from a column title.

Any help is graciously appreciated.
Chris
 
Top