Hi
im trying to do a lookup in a list found in other workbook.
The workbookname is a variable, in this example "Test3720.xlsm"
When i write the function with the workbookname "hardtyped", it work fine, with the searched woorkbook both opened and closed... the code goes like this
But when i try to replace the workbookname with a variable found in a cell (the "Test3720" part of the string), like this
(the value of cell C4 is ofc "Test3720"), then it all of a sudden works fine when the workbook "Test3720.xlsm" is open... but when closed the return of my function turns to #REF !
Why is that?? Any1 that knows? And anything i can do to make the function also work so it can search data in closed workbooks??
Best regards
Kasper
im trying to do a lookup in a list found in other workbook.
The workbookname is a variable, in this example "Test3720.xlsm"
When i write the function with the workbookname "hardtyped", it work fine, with the searched woorkbook both opened and closed... the code goes like this
Code:
=VLOOKUP(C2;'C:\Test\Test3720.xlsm'!lNettoPriser;2;FALSE)
But when i try to replace the workbookname with a variable found in a cell (the "Test3720" part of the string), like this
Code:
=VLOOKUP(C2;INDIRECT("'C:\Test\" & C4 & ".xlsm'!lNettoPriser");2;FALSE)
(the value of cell C4 is ofc "Test3720"), then it all of a sudden works fine when the workbook "Test3720.xlsm" is open... but when closed the return of my function turns to #REF !
Why is that?? Any1 that knows? And anything i can do to make the function also work so it can search data in closed workbooks??
Best regards
Kasper