Filename in formula taken from a cell

-emma-

Board Regular
Joined
Jul 14, 2006
Messages
180
Office Version
  1. 365
Platform
  1. Windows
Hi,
I am looking for information to be pulled from another document - however - the document I want to link to will change often.
Ideally, what I want to be able to do is create the formula to look in a specific cell for the file name.
For example:

A1 = Emma.xlsx

B1 = '//DF.link2/Documents/[Emma.xlsx]Info'!D5
but what I want is for the File name to be whatever is displayed in A1 (the Emma.xlsx)

A few things to add - A1 may end up being a validation list at some point going forward, I am not sure if this will impact or not. Also I cannot use Marcos or VBA (work security settings).

If anyone could help me out on this, it would be fantastic! Thanks :)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try:

varios 22ene2023.xlsm
AB
1emma.xlsxsome
Hoja1
Cell Formulas
RangeFormula
B1B1=INDIRECT("[" & A1 & "]Info!$D$5")


If ref_text refers to another workbook (an external reference), the other workbook must be open. If the source workbook is not open, INDIRECT returns the #REF! error value.
 
Upvote 0
Try:

varios 22ene2023.xlsm
AB
1emma.xlsxsome
Hoja1
Cell Formulas
RangeFormula
B1B1=INDIRECT("[" & A1 & "]Info!$D$5")


If ref_text refers to another workbook (an external reference), the other workbook must be open. If the source workbook is not open, INDIRECT returns the #REF! error value.
This works great - thanks!

I have however run into a little problem. One of the places I will be using this is a tab called "Info Complex" - the formula retuns a #REF! and the only reason I can see this happens is due to the space in the tab name.

Don't suppose there is a magic fix for this is there please? (Fingers crossed)

Thanks
 
Upvote 0
When there are spaces in the name, the formula must contain apostrophes.

Try:

Excel Formula:
=INDIRECT("'[" & A1 & "]Info'!$D$5")
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

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