Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VLOOKUP
VLOOKUP
Resolved · High Priority · Version 2003
Steven has attended:
Excel VBA Intro Intermediate course
VLOOKUP
Is it possible to use a named range from a separate (but open) workbook in a VLOOKUP fomula? I have done this in the same workbook, but for some reason cannot get it to work when the range is in a separate workbook.
Regards,
Steven
For upcoming training course dates see: Pricing & availability
RE: VLOOKUP
Hi Steven
Thankyou for your question
I am assuming you are trying to accomplish this using code.
The following example shows the main principles
strData = application.worksheetfunction.vlookup(Range("a3") ,Range(workbooks("Source").names("MyRange")),3,False)
The key point to note is that the argument specifying the lookup table is
Range(workbooks("Source").names("MyRange"))
This specifies that you are looking at a range defined by the name MyRange in the "source" workbook
Hope this helps
Regards
Stephen
RE: VLOOKUP
Thanks Stephen, I will try applying this.
Steven
|
