Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Negentropy
 
Posts: n/a
Default Making path of linked cell dynamic


Hi all,

Is there a syntax to make the path of a linked cell dynamic? I’ll
explain with an example:

Cell A1 is linked to another excel file, example.xls, in the folder
week 40.
So the formula in cell A1: ='C:\week _40_\[example.xls]Blad1'!$A$1

In this formula, I want the value _40_ to be dynamic, and read this
value from cell B1.
So lets say I put _41_ in to cell B1, the formula in cell A1 should
read ='C:\week _41_\[example.xls]Blad1'!$A$1

Any way to go about this? Thanks a lot in advance!

Cheers, Chris


--
Negentropy
------------------------------------------------------------------------
Negentropy's Profile: http://www.excelforum.com/member.php...o&userid=27525
View this thread: http://www.excelforum.com/showthread...hreadid=470451

  #2   Report Post  
Bernard Liengme
 
Posts: n/a
Default

Try the INDIRECT function
=INDIRECT("'C:\week "&B1&"\[example.xls]Blad1'!$A$1")
(untested - no time today)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Negentropy" wrote
in message ...

Hi all,

Is there a syntax to make the path of a linked cell dynamic? I’ll
explain with an example:

Cell A1 is linked to another excel file, example.xls, in the folder
week 40.
So the formula in cell A1: ='C:\week _40_\[example.xls]Blad1'!$A$1

In this formula, I want the value _40_ to be dynamic, and read this
value from cell B1.
So lets say I put _41_ in to cell B1, the formula in cell A1 should
read ='C:\week _41_\[example.xls]Blad1'!$A$1

Any way to go about this? Thanks a lot in advance!

Cheers, Chris


--
Negentropy
------------------------------------------------------------------------
Negentropy's Profile:
http://www.excelforum.com/member.php...o&userid=27525
View this thread: http://www.excelforum.com/showthread...hreadid=470451



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you put the workbook name into another cell, you could use =indirect() to
build the reference to the other workbook.

The bad news is that =indirect() will return an error if that other workbook
isn't open.

Harlan Grove wrote a UDF called PULL that will retrieve the value from a closed
workbook.

You can find the function at Harlan's FTP site:
ftp://members.aol.com/hrlngrv/
Look for pull.zip

Negentropy wrote:

Hi all,

Is there a syntax to make the path of a linked cell dynamic? I’ll
explain with an example:

Cell A1 is linked to another excel file, example.xls, in the folder
week 40.
So the formula in cell A1: ='C:\week _40_\[example.xls]Blad1'!$A$1

In this formula, I want the value _40_ to be dynamic, and read this
value from cell B1.
So lets say I put _41_ in to cell B1, the formula in cell A1 should
read ='C:\week _41_\[example.xls]Blad1'!$A$1

Any way to go about this? Thanks a lot in advance!

Cheers, Chris

--
Negentropy
------------------------------------------------------------------------
Negentropy's Profile: http://www.excelforum.com/member.php...o&userid=27525
View this thread: http://www.excelforum.com/showthread...hreadid=470451


--

Dave Peterson
  #4   Report Post  
Negentropy
 
Posts: n/a
Default


Hi,

Thanks for pointing me to the indirect() function, it's been very
helpful!
Pity that it only works when the other file is open as mentioned, some
sheets I want to use it in link to 10+ files. I'll have a closer look
at that pull file (Thanks!) but seeing im a n00b when it comes to vb
I'll do this with a bit clearer head tomorrow ;)

Thanks for the help!

Cheers, Chris


--
Negentropy
------------------------------------------------------------------------
Negentropy's Profile: http://www.excelforum.com/member.php...o&userid=27525
View this thread: http://www.excelforum.com/showthread...hreadid=470451

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
linked cell contents not autofitting row height joeeng Excel Discussion (Misc queries) 5 August 2nd 05 07:58 PM
Link a cell to another workbook with a different path Jai Excel Worksheet Functions 3 August 1st 05 02:05 AM
How can I replace the path of the linked spreadsheet in a cell? Norm Excel Worksheet Functions 2 July 30th 05 06:26 AM
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
dynamic external cell reference bg.itdept Excel Worksheet Functions 4 February 19th 05 03:15 AM


All times are GMT +1. The time now is 11:14 PM.

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

About Us

"It's about Microsoft Excel"