+ Reply to Thread
Results 1 to 2 of 2

Vlookup question. Searching for lookup over 2 separate columns

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    2

    Vlookup question. Searching for lookup over 2 separate columns

    Sorry but I'm new to vlookup. I have "agent #" in column A of worksheet 1 and I have the "agent #" on column A of worksheet 2 and "alternate agent #" on column B of worksheet 2. Column c of worksheet 2 contains the "agent's email address". I want my vlookup to search for the agent # in worksheet 1 and search both agent # and alternate agent # on worksheet 2. For example, if it does not find a match in column 1 worksheet 2, it will search column 2 worksheet2 for a match. When, all is complete, I want the vlookup to output the agent's email address.

    I hope I was clear. Thank you for any feedback.

  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,939

    Re: Vlookup question. Searching for lookup over 2 separate columns

    try something like this - adjust ranges as needed...
    =IF(ISERROR(VLOOKUP(A2,Sheet2!$A$2:$C$4,3,FALSE)),VLOOKUP(A2,Sheet2!$B$2:$C$4,2,FALSE),VLOOKUP(A2,Sheet2!$A$2:$C$4,3,FALSE))
    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)

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