vlookup
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VLOOKUP

VLOOKUP

resolvedResolved · High Priority · Version 2003

replyReply Wed 26 Nov 2008, 16:12Delegate Steven said...

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

replyReply Thu 27 Nov 2008, 14:05 Edited on Thu 27 Nov 2008, 14:05Trainer Stephen said...

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

replyReply Thu 27 Nov 2008, 15:27Delegate Steven said...

RE: VLOOKUP

Thanks Stephen, I will try applying this.
Steven

 

Please browse our web site to find out more about
best training excel intermediate and other Microsoft training courses.

Excel tip:

Brighten up your Excel 2010 Spreadsheet by changing the colours of the gridlines

Excel 2010 allows you to change the colour of grid lines instead of keeping them in boring black.

Select the File tab on the Ribbon, click Options, click Advanced, scroll down to ''Display options for this worksheet.'' Next to ''Gridline colour,'' choose your favourite colour, then once you've done this, click OK. Easy!

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard