+ Reply to Thread
Results 1 to 9 of 9

Look up Values using more than 1 criteria and return readings

Hybrid View

  1. #1
    Registered User
    Join Date
    04-19-2012
    Location
    Nairobi, Kenya
    MS-Off Ver
    Excel 2007
    Posts
    40

    Look up Values using more than 1 criteria and return readings

    Hi

    I have 2 tables that I need to match 2 components of each table, so as to get a corresponding match.
    As in the example, Table 2 lacks data on third column "Brand_Price".
    The data exists in Table 1, but table 1 may be:

    1. Jumbled up
    2. be larger than table 2 (as this example)
    3. Be smaller

    Hence I would like a return on 3rd column of table 2 to be, only when the 1st and 2nd cell in the row match

    I have 2 tabs in my example, the problem as is, and what it should be, indicating from which rows/cells Table 2 has returned from table 1

    Many Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Look up Values using more than 1 criteria and return readings

    Enter as array formula with Ctrl+Shift+Enter:
    =INDEX(A3:C30,MATCH(E3&F3,A3:A30&B3:B30,0),3)

  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
    53,048

    Re: Look up Values using more than 1 criteria and return readings

    Or this non-array formula...
    =INDEX($C$3:$C$30,MATCH(E3&F3,INDEX($A$3:$A$30&$B$3:$B$30,0),0))
    copied down
    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
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Look up Values using more than 1 criteria and return readings

    FDibbins, curious if I may, are there preferences as to when one should or should not use an array? I do like your take on it, though. Very nice.

  5. #5
    Registered User
    Join Date
    04-19-2012
    Location
    Nairobi, Kenya
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Look up Values using more than 1 criteria and return readings

    @Fdibbins - Worked like a charm, thanks
    @Soberguy - Somethings off, returns #VALUE - Maybe I misunderstand the array enter instruction. It would be good to know 2 ways to do this

  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
    53,048

    Re: Look up Values using more than 1 criteria and return readings

    Quote Originally Posted by soberguy View Post
    FDibbins, curious if I may, are there preferences as to when one should or should not use an array? I do like your take on it, though. Very nice.
    array's can become resource-heavy, probably wont make any difference in this example, but if used a lot, they can slow a file down.
    Also, never a good idea to use full-column ranges with arrays (not that we were, just saying)

  7. #7
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Look up Values using more than 1 criteria and return readings

    Arrays are confirmed with pressing Control AND Shift AND Enter at the same time. So while in the formula bar at the top, I usually hit and hold control, then shift, then hit the enter key.

  8. #8
    Registered User
    Join Date
    04-19-2012
    Location
    Nairobi, Kenya
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Look up Values using more than 1 criteria and return readings

    @Soberguy ... Works. Many Thanks

  9. #9
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Look up Values using more than 1 criteria and return readings

    Thanks. Going to keep that tidbit stored and try to use your non-array with some of my large data sets.

+ 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: 10-01-2014, 04:50 PM
  2. Index Match using two criteria to return on of criteria values
    By RogueLeader in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2014, 09:50 AM
  3. Replies: 3
    Last Post: 12-13-2013, 06:23 AM
  4. Replies: 1
    Last Post: 07-03-2013, 12:14 AM
  5. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 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