Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default Referring To A Cell In A Workbook Name Based On A Cell Value

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referring to first cell in a range FARAZ QURESHI Excel Discussion (Misc queries) 5 December 26th 07 05:14 PM
HYPERLINK() referring value from a cell does not change when cell Hung Excel Worksheet Functions 1 June 8th 07 03:22 AM
Sum values referring to a cell with same value ghnogueira Excel Discussion (Misc queries) 3 March 23rd 07 09:11 PM
referring to a cell containing a file name [email protected] Excel Discussion (Misc queries) 2 December 4th 06 05:03 PM
Linking a cell to another workbook cell based on a variable name Brian Excel Discussion (Misc queries) 6 June 1st 05 11:54 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"