+ Reply to Thread
Results 1 to 4 of 4

VLookup on data from one workbook from a named range on a different workbook

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    VLookup on data from one workbook from a named range on a different workbook

    Workbook A has two sheets, one of which (not the active sheet) has a named range called "ObjectCodes" to be used for VLOOKUPs.

    Workbook B has a column that needs to be filled with the results of the VLOOKUP. The problem is that I need the row number of the lookup value to be dynamic (so I can say "A2", then "A3", then "A4", etc) but retain the vlookup to be on a different workbook (which will be open when the VB code is run). The reason for this is there are a ton of calculations that need to be performed per line (and putting in the formulas would cripple the sheet), so I am having it cycle through them with a For...Next loop to just fill in the blanks.

    Example Code as presently written, which I know doesn't work:
    Please Login or Register  to view this content.
    The output should be the first four characters from Column AK, then a " - ", then the output of the VLOOKUP from Workbook A. The active workbook and sheet should never move away from Workbook B.

    My brain hurts at this point, so any input would be helpful.
    Last edited by Phixer; 05-14-2014 at 08:50 AM.

  2. #2
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: VLookup on data from one workbook from a named range on a different workbook

    Can anyone assist with this? I continue to 'try' things but nothing seems to be working.

  3. #3
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: VLookup on data from one workbook from a named range on a different workbook

    I am trying this, but am getting a Runtime error 9
    Please Login or Register  to view this content.
    Last edited by Phixer; 05-14-2014 at 08:41 AM.

  4. #4
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: VLookup on data from one workbook from a named range on a different workbook

    Ok, the code that finally worked, apparently it didn't like the way I entered the named range, or the variable to pull by:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Code to copy data from a closed workbook and paste in active workbook using named range.
    By paullie1912 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-28-2014, 02:38 AM
  2. Get data from other workbook with named range
    By jtraynor in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-06-2012, 06:55 PM
  3. [SOLVED] INDIRECT will not post Text string to Data Validation for Named Range on another Workbook
    By carleaston in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-15-2012, 05:08 PM
  4. How to change the sources of all Pivot tables in a workbook to a named data range?
    By abhi.ko in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2012, 01:26 PM
  5. [SOLVED] Named Range in another workbook
    By Jon C in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1