ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking with text string (https://www.excelbanter.com/excel-programming/277263-re-linking-text-string.html)

Tom Ogilvy

Linking with text string
 
=Indirect("'C:\acc\[" &f1&".xls]Section A'!H4")

would be the way to do it, but Indirect doesn't work with a closed workbook.
So you would need to use code to build your string and hard code it in the
cell.

--
Regards,
Tom Ogilvy


"Nigel Chapman" wrote in message
news:1063794461.820256@dyfi...
I wonder if anyone can help me.
What I want to do is to be able to link to another file using a text

string
picked up from my current sheet.

In the example below, which doesnt work, cell F1 contains my file name,

and
the effect I want to achieve is :

='C:\acc\[data.xls]Section A'!H4

='C:\acc\[" &f1&".xls]Section A'!H4 where FI contains the string "data"

Is it possible to include strings in linking like this?

Any help greatly appreciated.

Thanks

Nigel






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com