PDA

View Full Version : Sleeper: Do a v-lookup on a closed workbook



Djblois
05-22-2007, 09:00 AM
Is it possible to perform a v-lookup on a closed workbook? I don't think it is but it would be nice if it can be done. I tested this code and it doesn't work:


Range("D2:D" & FinalRow).FormulaR1C1 = _
"=VLOOKUP(RC[-1],'[H:\@Business_Reporting_Today\References\BusinessReportingReference.xls]Whses'!C1:C8,2,FALSE)"

Bob Phillips
05-22-2007, 10:09 AM
Yes it works, but there is no need for @

Bob Phillips
05-22-2007, 10:11 AM
It should be


Range("D2:D" & FinalRow).Formula = _ "=VLOOKUP(C2,'H:\Business_Reporting_Today\References\[BusinessReportingReference.xls]Whses'!C1:C8,2,FALSE)"

Djblois
05-22-2007, 10:12 AM
@ is there because they precede the folder name with that. I will test it again. It didn't work the first time.

Djblois
05-22-2007, 10:52 AM
it seems to be running slower with the workbook closed. Is this normal?