Referencing a file when it is open/closed

RSilverstein

New Member
Joined
Jun 27, 2008
Messages
6
I have two workbooks: one with raw data, and one that uses that data.

My 1st workbook references cells within the 2nd one using:

=INDIRECT("'[Next Level Input.xls]Sheet1'!"&"$C"&$F$4)

Essentially, I am looking for it to return the data in a cell: with column "C" and the row of F4.


All of the references work fine when the file "Next Level Input" is open, but if that file is closed, I get a #REF! error.

Does anyone know why? And how to fix that. Right now I just have to open up "Next Level Input" whenever I want to work with my original workbook.

Thanks,

RSilverstein
 

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

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
The INDIRECT function doesn't work with closed workbooks, try using INDEX instead, i.e.

=INDEX('[Next Level Input.xls]Sheet1'!$C:$C,$F$4)
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
There are other situations where INDIRECT is useful, for instance you might want to hold a variable worksheet name in a cell and use INDIRECT to refer to that sheet.......
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,555
Messages
5,832,448
Members
430,135
Latest member
Xefi

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