View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Referring To A Cell In A Workbook Name Based On A Cell Value

This can be done.

However, you'll have to keep this linking formula as a *text* "non-formula"
until the actual WB is created and saved at least once, otherwise it'll
return a #Ref! error.

If you accurately posted your correct path, try this in say D2 of Workbook1:

="='c:\workbooks\["&$A$1&".xls]spreadsheet1'!D76"

Don't be concerned that what you see in the cell, and what you see in the
formula bar, is not identical.

NOW, right click in D2 and choose "Copy",
Then, right click in A2, and choose "Paste Special"
Click on "Values", then <OK.

You now have a text, non-working formula in A2, waiting for the actual WB
whose name is entered in A1, to be created and saved, which *does* contain a
WS named "spreadsheet1".
Once you've completed creating the WB, it's time to "activate" the formula.
You do this by simply opening and closing TTC.
Click in A2, and from the Menu Bar,
<Data <Text To Columns <Finish

If you have data in D76, of worksheet "spreadsheet1", in workbook (name in
A1), on drive C:, it'll now be displayed in A2.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------





"DINGO0Z" wrote in message
...

I am writing a formula in cell "C1" in "Workbook #1" that will reference
cell "D76" in a workbook that has not been created yet. The way I will
tell the formula what the name of the workbook will be is by
referencing cell "A1" and adding the extension .xls to it.

Example:
"Workbook #1"
_A___|B_|C
1_Tax_|__|=c:workbooks\A1.xls, spreadsheet1, cell # D76
(c:workbooks\Tax.xls, spreadsheet1 cell # D76)
2_____|__|__

Can anyone tell me the formula syntax to accomplish this, or is it even
possible?

Thank you for any replies,
-Dan




--
DINGO0Z