dynamically link to other workbooks

Remaniak

New Member
Joined
May 2, 2007
Messages
36
Hi Guys,

Question:
I need to gather the values of the exact same cell but from 30 different workbooks.

Say the cell is 'Activities'!A1

The path of the workbook is 'D:\Documents and Settings\administrator\My Documents\[sales 2006.xls]Activities'!A1

But how do I create a formula that pickes up the Excel file name from a particular cell.

Thus:
='D:\Documents and Settings\administrator\My Documents\[B1]Activities'!A1

Thanks

Michiel
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,124
If the 30 workbooks are not open which I presume they are not you will need to use VBA to do this I'm afraid... unfortunately the *standard* INDIRECT formula will not work when linked to closed workbooks
 
Upvote 0

Jon von der Heyden

MrExcel MVP, Moderator
Joined
Apr 6, 2004
Messages
10,894
Office Version
  1. 365
Platform
  1. Windows
INDIRECT.EXE can do it (I think). Search for this on the web - I think it's part of the morefunc addin. Can someone back this up?
 
Upvote 0

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,124
I believe it does Jon but from what I've heard it can be slow to run and does not always work... I'd be inclined myself to build and return the formulas dynamically in VB routine as would you I guess.
 
Upvote 0

Remaniak

New Member
Joined
May 2, 2007
Messages
36
Thanks guys,

In that case I'll just use the simple replace action on the formula's with Excel filenames.

Regards,

Michiel
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,380
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
FWIW, it's INDIRECT.EXT but I've had some odd results with it.
 
Upvote 0

Forum statistics

Threads
1,191,125
Messages
5,984,786
Members
439,911
Latest member
dk73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top