+ Reply to Thread
Results 1 to 11 of 11

Two way lookup with multiple criteria

  1. #1
    Registered User
    Join Date
    02-24-2008
    Location
    Oslo, Norway
    MS-Off Ver
    Office 2013
    Posts
    34

    Question Two way lookup with multiple criteria

    Hi

    I want to make a to way lookup with multiple criteria to get some values in a table (see attached file).
    I have tried with "index, match, match", but couldn't get i to work.
    Any suggestions?

    Tommy
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Two way lookup with multiple criteria

    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    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,936

    Re: Two way lookup with multiple criteria

    Try this regular formula, copied across...
    =INDEX(C$2:C$7,MATCH($A11&" "&$B11,INDEX($A$2:$A$7&" "&$B$2:$B$7,0),0))
    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

  4. #4
    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,936

    Re: Two way lookup with multiple criteria

    LeoTaxi, Sorry for off-topic interjection:

    Although there is no official rule regarding this behavior, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Two way lookup with multiple criteria

    Try this...

    Entered in C11 and copied across:

    =SUMIFS(C2:C7,$A2:$A7,$A11,$B2:$B7,$B11)

    You may have to replace the commas with semi-colons.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    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,936

    Re: Two way lookup with multiple criteria

    tomjoe, a quick question...
    Will the data always be unique, or would you need to combine duplicate values?

  7. #7
    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,936

    Re: Two way lookup with multiple criteria

    hmm also...Please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version.

  8. #8
    Registered User
    Join Date
    02-24-2008
    Location
    Oslo, Norway
    MS-Off Ver
    Office 2013
    Posts
    34

    Re: Two way lookup with multiple criteria

    Thank you for trying to help me out.
    To explain it better:
    If the cell A11, B11 and C10:E10 changes, the formula should still find the matching value in the table above. It should be possible to put the lookup tale in another sheet or even another workbook and the formula should still work.
    I have tried with something like this ={INDEX($A$1:$N$7,MATCH($A11&$B11,$A$1:$A$7&$B$1:$B$7,0),MATCH(C$10,$C$1:$N$1,0))}. Am I overcomplicating Things?

  9. #9
    Registered User
    Join Date
    02-24-2008
    Location
    Oslo, Norway
    MS-Off Ver
    Office 2013
    Posts
    34

    Re: Two way lookup with multiple criteria

    OK, I was on right track, but hadn't all detailes right.
    The formula should be ={INDEX($A$1:$N$7,MATCH($A11&$B11,$A$1:$A$7&$B$1:$B$7,0),MATCH(C$10,$A$1:$N$1,0))}

    Tommy

  10. #10
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Two way lookup with multiple criteria

    C11=IFERROR(INDEX($C$2:$E$7,MATCH($A11&$B11,INDEX($A$2:$A$7&$B$2:$B$7,0),0),MATCH(C$10,$C$1:$E$1,0)),"")
    Please Login or Register  to view this content.
    Try this and copy across
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  11. #11
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: Two way lookup with multiple criteria

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

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

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Czeslaw; 09-19-2015 at 05:29 AM.

+ 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. Replies: 1
    Last Post: 09-04-2014, 12:14 PM
  2. Replies: 9
    Last Post: 08-20-2014, 04:43 PM
  3. [SOLVED] Lookup and sum multiple values based on a single criteria in multiple sheets.
    By paulsanett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 12:18 PM
  4. Replies: 0
    Last Post: 10-16-2013, 12:42 PM
  5. Replies: 11
    Last Post: 02-07-2013, 02:22 AM
  6. Replies: 2
    Last Post: 05-10-2012, 10:38 AM
  7. Replies: 1
    Last Post: 05-16-2011, 05:00 PM

Tags for this Thread

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