1

I can use an external reference easily in Excel 2010 like this

Cell A1 : ='BLAH.XLSX'!Fees[[#Totals],[Billable Hours]]

but lets say B1 contains FOO.XLSX

I now want A1 to be

='FOO.XLS'!Fees[[#Totals],[Billable Hours]]

I tried the indirect function

=INDIRECT(CONCATENATE("'", B1, "'!Fees[[#Totals],[Billable Hours]]"))

But this just gives a #REF error, but it resolves (I used the show steps function in excel) to:

=INDIRECT("'FOO.XLSX'!Fees[[#Totals],[Billable Hours]]")

I've tried (played with) a number of things but nothing gives me the reference correctly

suchas =INDIRECT(CONCATENATE("='", B1, "'!Fees[[#Totals],[Billable Hours]]")) which resolves to

=INDIRECT("='FOO.XLSX'!Fees[[#Totals],[Billable Hours]]")

Also I want to avoid VBA to avoid security warnings/dialogs etc., but will accept this if that's the the only way

I feel I'm really close

2
  • Indirect returns #REF if the second workbook is closed. Does it work when it's open? Commented Jan 31, 2012 at 6:44
  • @PreetSangha: Still looking for a VBA solution? Commented Jun 14, 2012 at 8:16

2 Answers 2

1

As Jesse says, you can't use INDIRECT to refer to closed workbooks. There is no other formula solution unless you use add-in functions. INDIRECT.EXT works with closed workbooks but you need to download MOREFUNC addin to get that function, google Morefunc

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. Is there a VBA solution?
1

See INDIRECT and closed workbooks at Dick's Blog

Harlan Grove's Pull function and opening the workbook directly via VBA for large scale manipulation are the two most commonly used methods

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.