Simple link to external xls file

jogeor

New Member
Joined
Jun 19, 2011
Messages
4
a1: 210.xls
a2: 211.xls
a3: 250.xls
....
an: 335.xls

In my master xls file, I want to link a cell from each of the above files listed in column A.

If I type (say to cell B1) =[210.xls]sheet1!$B$6 I can get the value of cell "B6" of "sheet1" of file "210.xls"

Now my question:
Is there a way to use values from column A inside the brackets?
I tried ="["&A1&"]... but it doesn't work.

Also, I do not want to use INDIRECT(), INDIRECT.EXT, or Harlan Grove’s PULL() function.

Can you help?
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Now my question:
Is there a way to use values from column A inside the brackets?
I tried ="["&A1&"]... but it doesn't work.

Not without using one of the functions that you don't want to use, or creating a new one the same as those.
 
Upvote 0
jasonb75,
Thanks

Ruddles,
I finally used INDIRECT()...

The problem is, I must have more than 100 files open, otherwise INDIRECT() gives an error message.

I also tried PULL() but it is very-very slow...

I have 20+ master files each of which has 800 cells to pull from each one of the 100 files.

I finally got my job done, but it is slow and sometimes crashes EXCEL.

More than that... it is not elegant!

Still looking.
 
Last edited:
Upvote 0
How about writing the direct version using vba?

Code:
[b1].formula ="=[" & [A1] & "]sheet1!$B$6"
 
Upvote 0
No, it bypasses those methods and writes the formula to the cell as if you had written it the normal way, when I said VBA, I meant as in macro, not custom function.

The formula you would see would be =[210.xls]sheet1!$B$6
 
Last edited:
Upvote 0
A quick example for you to try in a dummy / test workbook.

Enter workbook names in A1:A6, then run the code

Code:
Sub not_so_indirect()
Dim mCell As Range, xlC As Variant
With Application
    xlC = .Calculation
    .ScreenUpdating = False
    .Calculation = xlCalculationManual
For Each mCell In Range("B1:B6")
    mCell.FormulaR1C1 = "=[" & mCell.Offset(, -1) & ".xls]sheet1!R6C2"
Next
    .ScreenUpdating = True
    .Calculation = xlC
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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
Back
Top