+ Reply to Thread
Results 1 to 2 of 2

MACO that does a lookup on values entered in one workbook, returns results from another WB

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    86

    MACO that does a lookup on values entered in one workbook, returns results from another WB

    I have a workbook named COUNTRIES where users enter country names in column L2 and below
    (the header name is CountryCodes and located in L1 )
    ExAMPLE OF ENTRIES COUND BE
    United States
    Afghanistan
    Aland Islands
    Albania etc
    The MACRO should then do a lookup on another workbook named COUNTRYCODES and then map the codes example


    United States = US
    Afghanistan = AF
    Aland Islands= AF
    Albania = AL etc

    so the out put sheet should only have US, AF,AF,AL etc.

    This is How it looks on the COUNTRYCODES workbook


    COLUMN A COLUMN B


    Long_Country Country_Code
    United States US
    Afghanistan AF
    Aland Islands AF
    Albania AL
    Algeria DZ
    American Samoa AS
    Andorra AD
    Angola AO
    Anguilla AI
    Antarctica AQ



    ALL THE WAY TO ROW 245 with other countries and codes

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: MACO that does a lookup on values entered in one workbook, returns results from anothe

    Why do you feel you need VBA for this? A regular vlookup*() will give you what you want, even if the other W/B is closed. Create it in the exact same way as if the other WB was another worksheet instead
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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] function that returns interest with different values depending previous cell's results
    By managingcrap in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-09-2013, 03:15 AM
  2. Lookup formula that returns unique multiple search results
    By wit2001large in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2013, 08:09 AM
  3. Lookup formula that returns unique multiple search results WITH ATTACHMENT
    By wit2001large in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-23-2013, 06:02 AM
  4. Replies: 3
    Last Post: 08-31-2011, 02:42 AM
  5. Replies: 0
    Last Post: 04-06-2010, 05:54 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