How to add a variable as a parameter for a link?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
You have one response in .misc.
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
 
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)
 

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