+ Reply to Thread
Results 1 to 11 of 11

return next value if mutlple values match

  1. #1
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    return next value if mutlple values match

    hello friends ,
    i am trying to configure formula ,
    thats searches E1 AND F1 , through A and B column , and returns its corresponding value in c column in cell E2 AND E3 AND SO ON....
    but problem rises when column a and b has two or more combination of E1 and F1 value .
    as a example i have attach sample file ...
    Attached Files Attached Files
    Last edited by raj soni; 12-23-2015 at 09:11 AM. Reason: attach sample file

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: return next value if mutlple values match

    Example is EMPTY! Please post a sample Excel file not image.

  3. #3
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: return next value if mutlple values match

    yes sir , attach sample file ....

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

    Re: return next value if mutlple values match

    This array formula** entered in E3:

    =IFERROR(INDEX(C2:C15,MATCH(1,(A2:A15=E1)*(B2:B15=F1)*(C2:C15=E2),0)+1),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: return next value if mutlple values match

    hello sir ,
    its not showing any values ,
    i want to search E1 and F1 combination in column a and b .
    as you can see in attach sample file ,
    there are two such combination .
    i want to return corresponding value of c column in e2 cell .
    since it has such sample combination , i want to return second corresponding value in e3 .

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

    Re: return next value if mutlple values match

    Here's your file with the formula entered.

    As you can see it returns the results that you have indicated.

    The formula must be array entered.

    Array formulas are entered differently than a regular formula. After you type in a regular formula you hit the ENTER key. With an array formula you must use a combination of keys. Those keys are the CTRL key, the SHIFT key and the ENTER key. That is, hold down both the CTRL key and the SHIFT key then hit the ENTER key.

    When done properly Excel will enclose the formula in squiggly brackets { }. You can't just type these brackets in, you must use the key combo to produce them. Also, anytime you edit an array formula it must be re-entered as an array using the key combo.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: return next value if mutlple values match

    sir , you have still not got my question properly ,

    i am trying to do below link formula with 2 lookups ..

    http://thinketg.com/how-to-return-mu...ch-or-vlookup/

    also i have attach sample file again ....
    Attached Files Attached Files

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

    Re: return next value if mutlple values match

    You changed the expected result in this latest file.

    Data Range
    A
    B
    C
    D
    E
    F
    G
    1
    Animal
    Name
    color
    Lookup:
    Mouse
    Mickey
    2
    Duck
    Daffy
    red
    will return
    green
    3
    Mouse
    Mickey
    green
    will return
    white
    4
    Mouse
    Mickey
    white
    5
    Bunny
    Bugs
    black
    6
    Pig
    Porky
    red
    7
    Dog
    Goofy
    green
    8
    Dog
    Pluto
    white
    9
    Dog
    Pluto
    black
    10
    ------
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F2:

    =IFERROR(INDEX(C:C,SMALL(IF((A$2:A$9=F$1)*(B$2:B$9=G$1),ROW(C$2:C$9)),ROWS(F$2:F2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,647

    Re: return next value if mutlple values match

    May be you need to establish a list.

    in F2:

    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Drag down.

    Copy column F to colum J
    Quang PT

  10. #10
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: return next value if mutlple values match

    thanks , Tony Valko and bebo021999
    , its working perfectly now .......

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

    Re: return next value if mutlple values match

    You're welcome. We appreciate the feedback!

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. [SOLVED] Vlookup/index/match to return all values that match
    By Asil01 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-09-2014, 12:49 PM
  2. [SOLVED] seperating mutlple values in a cell, then adding across the row.
    By JavierME in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 07-27-2014, 10:02 PM
  3. Using Index/Match to return multiple values for one match
    By superboy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-10-2014, 06:21 PM
  4. VLOOKUP/INDEX/MATCH to return all values that match
    By lijia00 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2014, 11:56 AM
  5. Replies: 1
    Last Post: 07-03-2013, 12:14 AM
  6. Replies: 2
    Last Post: 11-12-2012, 06:26 AM
  7. Replies: 5
    Last Post: 10-11-2008, 04:01 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