+ Reply to Thread
Results 1 to 5 of 5

Lookup with Multiple criteria

  1. #1
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    263

    Lookup with Multiple criteria

    I am having troubles getting my formulas correct in reference to looking up multiple criteria.
    I have got to this stage whereby I will give an example and hope the smart people can show me the formula.
    As per the attached sample, I would like to match up Columns A, B,C and F from sheet2 with columns a,b,c and d in Sheet1.
    Once the formula finds a match I would like the value in Column E of Sheet 1 to be placed in Sheet 2's Column G.
    Could someone please help me solve this query. Thank you in advance for any support you can offer.
    Attached Files Attached Files

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

    Re: Lookup with Multiple criteria

    To begin with, none of your data matches.

    You have 10 on sheet1 and U10 on sheet2
    you have South Waverley on sheet1 and South Waverley/Sandown on sheet2

    This will work, IF you can get your data sorted out (at least the Teams).
    1. on sheet1, F2, copied down...
    =A2&B2&C2&D2
    On sheet2 H2, copied down...
    =A2&MID(B2,2,99)&C2&F2
    then on sheet2 G2, copied down...
    =INDEX(Sheet1!$E$2:$E$13,MATCH(Sheet2!H2,Sheet1!$F$2:$F$13,0),1)
    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

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup with Multiple criteria

    In G2, copied down:

    =INDEX(Sheet1!$E$2:$E$13, MATCH($A2&"-"&$B2&"-"&$C2&"-"&LEFT($F2, 8)&"*", INDEX(Sheet1!$A$2:$A$13&"-U"&Sheet1!$B$2:$B$13&"-"&Sheet1!$C$2:$C$13&"-"&Sheet1!$D$2:$D$13,0),0))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    01-23-2010
    Location
    Moscow
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Lookup with Multiple criteria

    Once the formula finds a match
    The formula will never finds a match. On Sheet1 The Age column has a number (10) and on Sheet2 the same column has a string (U10).

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup with Multiple criteria

    Each of the solutions given above, Igor, show ways around that inconsistency.

+ 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