Indirect function error

D_Train

New Member
Joined
Oct 28, 2008
Messages
3
Hi,

I am using the indirect funciton combined with the match funciton to look up cells from external workbooks. All the workbooks are open however I am faced with a sheet full of #ref cells :mad:.

Yesterday the same thing happened, although the sheet decided to work an hour after my deadline!

Is it possible that the workbook doesn't recognise that the other workbooks are open?

Cheers, Dave
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
What is your formula?

The syntax should be something like:

=MATCH(A1,INDIRECT("'C:\MyFile.xls'!A1:A10"),0) - note the single quotes enclosing the filename
 
Upvote 0
=offset(indirect("'["&$a6&"]"&$a$1&"'!a1"),match($b6,indirect("'["&$a6&"]"&$a$1&"'!$a:$a"),0)-1,match(f$3,indirect("'["&$a6&"]"&$a$1&"'!$6:$6"),0)-1)

I haven't been using the file path, just the file name.
 
Upvote 0
Well I'm not going to debug a long formula where I don't know any of the inputs. Maybe try removing the brackets, i.e. this

=MATCH(A1,INDIRECT("'[this is a test.xls]'!A1:A10"),0)

does not work. But, this does

=MATCH(A1,INDIRECT("'this is a test.xls'!A1:A10"),0)
 
Upvote 0
Thanks, my reference didn't include .xls and the end of the file name.

That has done the trick!

P.S. It worked the day before without the .xls however.. :confused:
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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