+ Reply to Thread
Results 1 to 11 of 11

Index Match Large Duplicate Values

  1. #1
    Registered User
    Join Date
    08-20-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    8

    Index Match Large Duplicate Values

    Hi,

    I cannot return each corresponding fruit to each largest price in below table.
    I have been trialing with Index, Match, Vlookup, and Row and keep failing even with a helper column Countif because I have duplicate values
    Checked out these old threads as well and have not been able to replicate the correct results.

    What am I missing?

    Original data:
    Apple 10
    Orange 11
    Strawberry 9
    Pear 5
    Banana 10

    Analysed data (using Large() fyi, cannot use Max for other reasons):

    ? 11
    ? 10
    ? 10
    ? 9
    ? 5


    Thanks for any help,

    http://www.mrexcel.com/forum/excel-q...g-results.html

    http://www.mrexcel.com/forum/excel-q...te-values.html
    Last edited by auxaurores; 09-11-2016 at 01:56 PM.

  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
    28,291

    Re: Index Match Large Duplicate Values

    Assuming data in A1:B5

    in C1

    =B1+ROWS($1:1)*10^-4

    in D1

    =INDEX($A$1:$A$5,MATCH(LARGE($C$1:$C$5,ROWS($1:1)),$C$1:$C$5,0))

    copy down

  3. #3
    Registered User
    Join Date
    08-20-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    8

    Re: Index Match Large Duplicate Values

    This completely does it...
    What if I wanted to add a criteria in my large i.e. match the large only where name = Peter?

    For example:

    John Apple 10
    Will Orange 11
    Mary Strawberry 9
    Peter Pear 5
    John Banana 10
    Last edited by auxaurores; 09-11-2016 at 02:54 PM.

  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: Index Match Large Duplicate Values

    Like this...

    Data Range
    A
    B
    1
    Apple
    10
    2
    Orange
    11
    3
    Strawberry
    9
    4
    Pear
    5
    5
    Banana
    10
    6
    ------
    7
    Orange
    11
    8
    Apple
    10
    9
    Banana
    10
    10
    Strawberry
    9
    11
    Pear
    5


    This array formula** entered in A7 and copied down:

    =INDEX(A:A,SMALL(IF(B$1:B$5=B7,ROW(B$1:B$5)),COUNTIF(B$7:B7,B7)))

    ** 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
    Registered User
    Join Date
    08-20-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    8

    Re: Index Match Large Duplicate Values

    Quote Originally Posted by Tony Valko View Post
    Like this...

    Data Range
    A
    B
    1
    Apple
    10
    2
    Orange
    11
    3
    Strawberry
    9
    4
    Pear
    5
    5
    Banana
    10
    6
    ------
    7
    Orange
    11
    8
    Apple
    10
    9
    Banana
    10
    10
    Strawberry
    9
    11
    Pear
    5


    This array formula** entered in A7 and copied down:

    =INDEX(A:A,SMALL(IF(B$1:B$5=B7,ROW(B$1:B$5)),COUNTIF(B$7:B7,B7)))

    ** 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.
    Thanks again, this solution is working as well!

    What if I wanted to add a criteria in my large i.e. match the large only where name = John?

    For example:

    John Apple 10
    Will Orange 11
    Mary Strawberry 9
    Peter Pear 5
    John Banana 10
    Last edited by auxaurores; 09-11-2016 at 03:23 PM.

  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: Index Match Large Duplicate Values

    Which bit of information are you wanting to extract?

  7. #7
    Registered User
    Join Date
    08-20-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    8

    Re: Index Match Large Duplicate Values

    I want to extract the fruit description based on: largest price where name = John.

    I guess the formula would look like this in G2 where:
    • Column A: Names
    • Column B = Fruits
    • Column C = Prices
    • Column D:=C1+ROWS($1:1)*10^-4


    =INDEX($B$2:$B$6,MATCH(LARGE(IF(A:A = "Peter"),$C$2:$C$6,ROWS($1:1)),$C$2:$C$6,0))

    Obviously this does not work...
    Last edited by auxaurores; 09-11-2016 at 03:22 PM.

  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: Index Match Large Duplicate Values

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    John
    Apple
    10
    John
    Apple
    2
    Will
    Orange
    11
    Banana
    3
    Mary
    Strawberry
    9
    4
    Peter
    Pear
    5
    5
    John
    Banana
    10
    6
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F1:

    =IFERROR(INDEX(B:B,SMALL(IF(A$1:A$5=E$1,IF(C$1:C$5=MAX(IF(A$1:A$5=E$1,C$1:C$5)),ROW(C$1:C$5))),ROWS(F$1:F1))),"")

    ** 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
    Registered User
    Join Date
    08-20-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    8

    Re: Index Match Large Duplicate Values

    Quote Originally Posted by Tony Valko View Post
    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    John
    Apple
    10
    John
    Apple
    2
    Will
    Orange
    11
    Banana
    3
    Mary
    Strawberry
    9
    4
    Peter
    Pear
    5
    5
    John
    Banana
    10
    6
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F1:

    =IFERROR(INDEX(B:B,SMALL(IF(A$1:A$5=E$1,IF(C$1:C$5=MAX(IF(A$1:A$5=E$1,C$1:C$5)),ROW(C$1:C$5))),ROWS(F$1:F1))),"")

    ** 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.
    Capture.PNG
    Using your formula, I changed one of the names to John. However the formula is not pulling it the third expected value, only the duplicated ones.
    Is it normal?

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

    Re: Index Match Large Duplicate Values

    I can't see PNG images on this site.



    The formula will only return the corresponding max value(s) for the single name listed.

    In the posted example John had duplicate max values.

  11. #11
    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
    28,291

    Re: Index Match Large Duplicate Values

    Data in A1:C5

    Please Login or Register  to view this content.
    in D1 and copy down

    =C1+ROWS($1:1)*10^-4

    in E1 ... name e.g John

    in F1

    =IFERROR(INDEX($B$1:$B$5,MATCH(LARGE(($D$1:$D$5)*($A$1:$A$5=$E$1),ROWS($1:1)),$D$1:$D$5,0)),"")

    Enter with Ctrl+Shift+Enter

+ 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. Match and Index with Duplicate values
    By shortracer5 in forum Excel General
    Replies: 1
    Last Post: 09-09-2016, 05:25 AM
  2. [SOLVED] Handling Duplicate Entries with Index/Match/Large in Column Data
    By TwiceBorn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-12-2016, 02:11 PM
  3. Index Match & Duplicate values
    By Shaulyt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2016, 05:23 PM
  4. [SOLVED] INDEX, MATCH & LARGE trouble with duplicate values
    By paulstuartbullock in forum Excel General
    Replies: 4
    Last Post: 08-04-2015, 11:17 PM
  5. Index Match with Duplicate Values
    By js2178a in forum Excel General
    Replies: 2
    Last Post: 09-28-2014, 02:21 AM
  6. [SOLVED] Help with Index/Match/Large problem with duplicate values
    By enphynity in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-31-2013, 09:56 AM
  7. Index, Match, Large Function returning duplicate names
    By RNeel55 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2013, 04:09 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