ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to add a variable as a parameter for a link? (https://www.excelbanter.com/excel-worksheet-functions/105216-how-add-variable-parameter-link.html)

Eric

How to add a variable as a parameter for a link?
 
Will it be possible to add a variable as a parameter for the link? as shown
below format, therefore, I can change its parameter based on certain cell
value to link different spreadsheets? for example

Original
'[filename.xls]6220.HK'!$E$2

Modified approach
'[filename.xls]C2.HK'!$E$2 , where C2 = 6220, which equals to linking
'[filename.xls]6220.HK'!$E$2

Thank for any suggestion
Eric

Dave Peterson

How to add a variable as a parameter for a link?
 
You have one response in .misc.

Eric wrote:

Will it be possible to add a variable as a parameter for the link? as shown
below format, therefore, I can change its parameter based on certain cell
value to link different spreadsheets? for example

Original
'[filename.xls]6220.HK'!$E$2

Modified approach
'[filename.xls]C2.HK'!$E$2 , where C2 = 6220, which equals to linking
'[filename.xls]6220.HK'!$E$2

Thank for any suggestion
Eric


--

Dave Peterson

Peo Sjoblom

How to add a variable as a parameter for a link?
 
You can use INDIRECT

=INDIRECT("'[filename.xls]"&C2&".HK'!$E$2")

note that the workbook needs to be open

--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(remove ^^ from email)


"Eric" wrote in message
...
Will it be possible to add a variable as a parameter for the link? as
shown
below format, therefore, I can change its parameter based on certain cell
value to link different spreadsheets? for example

Original
'[filename.xls]6220.HK'!$E$2

Modified approach
'[filename.xls]C2.HK'!$E$2 , where C2 = 6220, which equals to linking
'[filename.xls]6220.HK'!$E$2

Thank for any suggestion
Eric




Eric

How to add a variable as a parameter for a link?
 
Thank everyone very much
Eric


All times are GMT +1. The time now is 06:13 AM.

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