gpsfsc
asked on
Using a Named Range as Parameter for External Links in Excel 2007
I have the following formula:
=VLOOKUP($I13;'\\sap01\dat a_new\Orga nisation\M arketing_S ales\Sales \Sales_Fun nel\Foreca st and Marketview Tool 2010 SAP-Data.xlsm'!CostOutput; N$523;FALS E)
and this works as expected.
Now I would like to replace the external link
'\\sap01\data_new\Organisa tion\Marke ting_Sales \Sales\Sal es_Funnel\ Forecast and Marketview Tool 2010 SAP-Data.xlsm' by a value in a cell or Named Range.
I tried a few things with INDIRECT() but nothing did the trick.
=VLOOKUP($I13;'\\sap01\dat
and this works as expected.
Now I would like to replace the external link
'\\sap01\data_new\Organisa
I tried a few things with INDIRECT() but nothing did the trick.
ASKER
This is exactly what I tried before but I get a #REF!-Error!
Q3 is set to '\\sap01\data_new\Organisa tion\Marke ting_Sales \Sales\Sal es_Funnel\ Forecast and Marketview Tool 2010 SAP-Data.xlsm'
Q4 is set to CostOutput
my formula looks like this:
=VLOOKUP($I13;INDIRECT(Q3& "!"&Q4);N$ 523;FALSE)
and it returns a #REF!-Error
One strange thing I noticed in the Evaluate Formula Tool:
-> see attached screen shot
It shows slightly incorrect quotes. Any ideas why?
Evaluate-Formula.jpg
Q3 is set to '\\sap01\data_new\Organisa
Q4 is set to CostOutput
my formula looks like this:
=VLOOKUP($I13;INDIRECT(Q3&
and it returns a #REF!-Error
One strange thing I noticed in the Evaluate Formula Tool:
-> see attached screen shot
It shows slightly incorrect quotes. Any ideas why?
Evaluate-Formula.jpg
Excel might be treating that first singlequote as a text qualifier. Try entering this in Q3 instead:
="'\\sap01\data_new\Organi sation\Mar keting_Sal es\Sales\S ales_Funne l\Forecast and Marketview Tool 2010 SAP-Data.xlsm'"
="'\\sap01\data_new\Organi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks teylyn
The issue with the two single quotes at the beginning of the string I should have come across myself and I feel quite a bit ashamed of this ....
But I was not aware of the fact that INDIRECT() only works on open workbooks and this is nor really obvious to me.
Thanks for the hint with Morefunc. This Add-In seems to be quite helpful. But I probably won't use it because the workbook will be used on PCs that don't have Morefunc installed and I don't like the constraints to include Morefunc in the workbook.
I will probably write a macro that opens the source file and use the standard INDIRECT() Function.
It might be faster anyway, as there are about 100'000 lookups.
What's your opinion on this? Are there any other issues to consider?
Thanks and have a nice day
gpsfsc
The issue with the two single quotes at the beginning of the string I should have come across myself and I feel quite a bit ashamed of this ....
But I was not aware of the fact that INDIRECT() only works on open workbooks and this is nor really obvious to me.
Thanks for the hint with Morefunc. This Add-In seems to be quite helpful. But I probably won't use it because the workbook will be used on PCs that don't have Morefunc installed and I don't like the constraints to include Morefunc in the workbook.
I will probably write a macro that opens the source file and use the standard INDIRECT() Function.
It might be faster anyway, as there are about 100'000 lookups.
What's your opinion on this? Are there any other issues to consider?
Thanks and have a nice day
gpsfsc
Thanks for the feedback and the grade, gpsfsc!!
ASKER
Hi teylyn
Sorry to bother you again ....
I did some tests with INDIRECT.EXT and it works as promised but it is sooooooooooooooooooooooooo o incredibly slow! Originally, with the direct path entries it took about 10 seconds to perform some 100'000 lookups in a closed workbook. Now with INDIRECT.EXT it takes EXCEL almost half an hour to update about 4000 lookups!
WHAT AM I DOING WRONG ? Is there a way to accelerate this?
Hear from you soon
gpsfsc
Sorry to bother you again ....
I did some tests with INDIRECT.EXT and it works as promised but it is sooooooooooooooooooooooooo
WHAT AM I DOING WRONG ? Is there a way to accelerate this?
Hear from you soon
gpsfsc
Well, unfortunately, INDIRECT is volatile, and so is INDIRECT.EXT
There may be ways to streamline the spreadsheet and improve performance, but it may require a redesign.
Have a look here for some insight on how to improve Excel performance
http://msdn.microsoft.com/en-us/library/aa730921.aspx
cheers, teylyn
There may be ways to streamline the spreadsheet and improve performance, but it may require a redesign.
Have a look here for some insight on how to improve Excel performance
http://msdn.microsoft.com/en-us/library/aa730921.aspx
cheers, teylyn
ASKER
Hi teylyn
INDIRECT.EXT has a parameter that can be set to behave volatile or not anf I have set it to non-volatile.
When I tried it it was with the source file closed. I'll give it a try with the source file open. If it doesn't improve, I have find some other way.
INDIRECT.EXT has a parameter that can be set to behave volatile or not anf I have set it to non-volatile.
When I tried it it was with the source file closed. I'll give it a try with the source file open. If it doesn't improve, I have find some other way.
=VLOOKUP($I13;'\\sap01\dat
then, if A1 has your external file path/name and B1 the range in that file...
=VLOOKUP($I13;INDIRECT(A1&
That is,
A1 '\\sap01\data_new\Organisa
B1 CostOutput