Making path of linked cell dynamic

  • Thread starter Thread starter Negentropy
  • Start date Start date
N

Negentropy

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
 
Try the INDIRECT function
=INDIRECT("'C:\week "&B1&"\[example.xls]Blad1'!$A$1")
(untested - no time today)
best wishes
 
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
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
 
Hi,

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

Thanks for the help!

Cheers, Chri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top