+ Reply to Thread
Results 1 to 3 of 3

similar to Vlookup but multiple options

  1. #1
    Registered User
    Join Date
    05-27-2015
    Location
    Minnesota
    MS-Off Ver
    2010
    Posts
    19

    similar to Vlookup but multiple options

    I have a table in one tab similar to the example below (table x):
    a12 Europe 4/4/2016 John
    b34 Europe 4/3/2016 Peter
    a12 north America 4/5/2016 Lucy
    a12 Asia 4/1/2016 Wade

    In another tab, I have a table like so (table y):
    Source Object Name
    Europe a12
    Asia a12
    Europe b34

    In table y, I want a macro to provide the names based on comparing the object and the source. I tried to do a vlookup based on object only, but that only provides the first name listed in table x, John, for both Europe and Asia rows in table y

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: similar to Vlookup but multiple options

    Try this

    Enter formula in H2 and copy down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v A B C D E F G H
    1 Object Source Date Name Source Object Name
    2 a12 Europe 4/4/2016 John Europe a12 John
    3 b34 Europe 4/3/2016 Peter Asia a12 Wade
    4 a12 north America 4/5/2016 Lucy Europe b34 Peter
    5 a12 Asia 4/1/2016 Wade
    Last edited by AlKey; 04-05-2016 at 10:53 AM. Reason: Added IFERROR fucntion
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: similar to Vlookup but multiple options

    Not sure you need VBA
    You can achieve this with formulas
    Insert an extra column to left of each table and in that column concatenate:
    -In table 1, cell in columnA followed by cell in columnB
    -In table 2, cell in columnB followed by cell in columnA
    This gives you the values you want to match
    Then use vLookup as normal

    see attached workbook
    Attached Files Attached Files
    Last edited by Kevin#; 04-06-2016 at 01:33 AM.
    If a response has helped then please consider rating it by clicking on *Add Reputation below the post
    When your issue has been resolved don't forget to mark the thread SOLVED (click Thread Tools at top of thread)

+ 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. using VLOOKUP or similar formula to retrieve dates from multiple cells
    By Ducklet64 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-15-2013, 10:10 PM
  2. How can I pull multiple options at once with Vlookup or anyother formula
    By djmatok in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-04-2012, 02:27 PM
  3. [SOLVED] VLOOKUP Multiple values (or similar)
    By kiwiana23 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2012, 08:57 PM
  4. VLOOKUP or similar to return multiple instances with a twist
    By superkaz661 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-28-2011, 09:26 PM
  5. Vlookup or similar on multiple criteria
    By sun815613 in forum Excel General
    Replies: 2
    Last Post: 02-28-2011, 03:36 PM
  6. Displaying multiple results using VLOOKUP or similar
    By soulsam in forum Excel General
    Replies: 5
    Last Post: 12-19-2009, 11:11 AM
  7. Vlookup on multiple similar entries / NO VBA
    By cedequ in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 09-06-2005, 09:05 PM

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