#REF! error tyring to get data from another wb using Indirect formula

kit99

Active Member
Joined
Mar 17, 2015
Messages
352
In my wb1/sheet1, I got this cells:
A21 = Full name of wb I'm trying to get data from ("Test1.xlsx")
B9 = Name of sheet in wb Test1.xlsx ("Eget materiell")
B10 = Name of cell reference wb Test1.xlsx ("B2")

If I put in this formula in a cell in wb1/sheet1:
Code:
='[Test1.xlsx]Eget materiell'!$B$2
everyting works.

But if I try to do this:
Code:
=INDIRECT("'["&A21&"]"&B$9&"'!"&B$10)
i get a #REF ! error.

How can I the "indirect" formula to work?
All workbooks are in the same folder.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Aside from not using the inverted commas in the cells that will work. Check any spelling mistakes.
 
Upvote 0
Aside from not using the inverted commas in the cells that will work. Check any spelling mistakes.

Thanks for suggestion. And by doing so, I just found out that all formulas work as they should - given that I open up wb "Test1.xlsx", "Test2.xlxs" and so on (yes I've got many of these wb's...).
Now what is that all about? Shouldn't this work even when workbooks is closed down?
 
Upvote 0
No - INDIRECT will only work with an open workbook.
 
Upvote 0
Only using something like INDIRECT.EXT in the MOREFUNC add-in or code like Harlan Grove's Pull function. Neither are ideal, in my opinion.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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