Link to home
Start Free TrialLog in
Avatar of JameMeck
JameMeckFlag for United States of America

asked on

Excel 2007 Dynamic Link To Another Files.

I have 1 excel data file with 31 sheets, and 1 report excel file.
The report excel file links to 31 sheets (days) of the excel data file, and I have formular like this:

The report excel file:
K2(Date): 12--> I will change this value everyday.
A5 (linked data from each sheet of the report excel file): =='4 Apr-10\[Apr-10.xls]12'!$W$38

so I want: when I change the value of K2 (Date) to 13, the link of A5 will change automatically to:
'4 Apr-10\[Apr-10.xls]13'!$W$38

Please help me.
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Flag of New Zealand image

Hello JameMeck,

You can do that with the Indirect() function, but for that to work you will need to have the Apr-10.xls workbook open. If the workbook is closed, the formula will return an error.

The formula would look like this

=Indirect("'4 Apr-10\[Apr-10.xls]"&K2&"'!$W$38")

Please note the type and order of the quote marks in the formula.

cheers, teylyn
Avatar of JameMeck

ASKER

Thank you very much!
But I have a lot of files to link data, it is nightmare to open all of those files to get data for my report.
Do you have any solution?
ASKER CERTIFIED SOLUTION
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, I got it.