+ Reply to Thread
Results 1 to 12 of 12

Question about LARGE duplicate values.

  1. #1
    Registered User
    Join Date
    12-25-2013
    Location
    Finalnd
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question about LARGE duplicate values.

    Hi, I'm kinda new to excel still so could anyone help me with this?
    I have 2 columns, one with text and another with numbers. Like this:
    A B
    a 1
    b 2
    c 3
    d 5
    f 5
    g 7

    I am trying to figure out how to get the largest value, 2nd largest, 3rd etc.
    So far I have figured out this, =INDEX(A4:A9; MATCH(LARGE(B4:B9;1);B4:B9;0)) <-- Works well as long as there are no duplicates.
    But when there comes a duplicate it only shows 1 of the values.
    How could I make them like unique(?) or that it shows them both in a alphabetic order or something similar?
    Like that I could have 2 cells, one with "d" and the other one with "f",
    Or a cell which would contain both of them.

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

    Re: Question about LARGE duplicate values.

    Hi and welcome to the forum

    I know there are other ways to break tie-breaks/duplicates, but This is the trick I always use.

    If B is where the duplicates would be, in a helper column, copied down...

    =B1&countif($B$1:B1,B1)/100
    This will give a new/helper column with unique values for B that you can then use in the INDEX/MATCH
    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
    Registered User
    Join Date
    12-25-2013
    Location
    Finalnd
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Question about LARGE duplicate values.

    Thanks for your reply,
    Well some progress I did get, I made that function on
    a different column and it made new values with commas to make them unique and such.
    But when I tried inserting those cells into the function it only showed a #NUM! error.
    Do I have to change the index/match function so it understands decimals or did I do something wrong?
    A--B-------------C---------------C results
    a 1 =B1&COUNTIF($B$1:B1;B1)/100 10,01
    b 2 =B2&COUNTIF($B$1:B2;B2)/100 20,01
    c 3 =B3&COUNTIF($B$1:B3;B3)/100 30,01
    d 5 =B4&COUNTIF($B$1:B4;B4)/100 50,01
    f 5 =B5&COUNTIF($B$1:B5;B5)/100 50,02
    g 7 =B6&COUNTIF($B$1:B6;B6)/100 70,02

    =INDEX(A1:A6; MATCH(LARGE(C1:C6;2);C1:C6;0))
    Was the function I used to see the 2nd largest number.
    It's exactly the same as last time just that it uses C rather than B.

  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: Question about LARGE duplicate values.

    Try this...

    Data Range
    A
    B
    C
    D
    1
    -----
    -----
    -----
    -----
    2
    a
    1
    g
    3
    b
    2
    f
    4
    c
    3
    d
    5
    d
    5
    c
    6
    f
    5
    b
    7
    g
    7
    a


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

    =INDEX(A$2:A$7,MATCH(LARGE(B$2:B$7+ROW(B$2:B$7)/1000000,ROWS(D$2:D2)),B$2:B$7+ROW(B$2:B$7)/1000000,0))

    ** 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
    12-24-2013
    Location
    China GuangZhou
    MS-Off Ver
    Excel 2003 &2007 & 2010
    Posts
    16

    Re: Question about LARGE duplicate values.

    =INDEX(A$4:A$9,MATCH(LARGE($B$4:$B$9-ROW($4:$9)%,ROW(1:1)),$B$4:$B$9-ROW($4:$9)%,))

    combination of CTRL,SHIFT,ENTER (not just ENTER).

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

    Re: Question about LARGE duplicate values.

    A
    B
    C
    D
    E
    1
    a
    1
    1.01
    g
    2
    b
    2
    2.01
    f
    3
    c
    3
    3.01
    d
    4
    d
    5
    5.01
    c
    5
    f
    5
    5.02
    b
    6
    g
    7
    7.01
    a


    C1=B1+COUNTIF($B$1:B1,B1)/100 copied down
    E1=INDEX($A$1:$A$6,MATCH(LARGE($C$1:$C$6,ROWS($A$1:A1)),$C$1:$C$6)) copied down

  7. #7
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Question about LARGE duplicate values.

    Reply to post#1
    Here's yet another formulas play to extract the full descending sort ....
    Assuming your source data as posted is in cols A and B, from row 2 down
    Place in
    D2: =IF(B2="","",B2-ROW()/10^5)
    E2: =INDEX(A:A,MATCH(LARGE($D:$D,ROWS($1:1)),$D:$D,0))
    Copy E2 to F2. Then select D2:F2, copy down to F7
    Hide away / minimize col D. Cols E and F will return the full descending sort of cols A and B (ordered by col B values)
    Ties if any, will be returned in the same relative order as per source data

    p/s: To do likewise for a Full Ascending sort (including ties)
    do the same steps as above, but with these replacement formulae
    D2: =IF(B2="","",B2+ROW()/10^5)
    E2: =INDEX(A:A,MATCH(SMALL($D:$D,ROWS($1:1)),$D:$D,0))
    -------------------------------
    Success? Wave it, click on the little star at the bottom left of my responses

  8. #8
    Registered User
    Join Date
    12-25-2013
    Location
    Finalnd
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Question about LARGE duplicate values.

    I got it working, thanks for all the help

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

    Re: Question about LARGE duplicate values.

    You're welcome. We appreciate the feedback!

  10. #10
    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,933

    Re: Question about LARGE duplicate values.

    Happy to help and thanks for the feedback

  11. #11
    Registered User
    Join Date
    07-25-2018
    Location
    England
    MS-Off Ver
    office 2010
    Posts
    9

    Re: Question about LARGE duplicate values.

    Quote Originally Posted by FDibbins View Post
    Hi and welcome to the forum

    I know there are other ways to break tie-breaks/duplicates, but This is the trick I always use.

    If B is where the duplicates would be, in a helper column, copied down...

    =B1&countif($B$1:B1,B1)/100
    This will give a new/helper column with unique values for B that you can then use in the INDEX/MATCH
    Hi, I'm finding this is either giving my scores a second decimal place, or turning 11.00 into 110.01

    What would you suggest in this instance? Scores are in Column N and go from row 4 to 18,259.

    I'm ranking the scores and the duplicates are giving me incorrect results in other areas.

  12. #12
    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,933

    Re: Question about LARGE duplicate values.

    JustGoCW welcome to the forum

    Unfortunately your post does not comply with Rule 4 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

    (The whole purpose of doing that is to add a very small decimal to the orig value, dependent on how many there are)

+ 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] 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
  2. [SOLVED] Large Formula with Duplicate Values
    By triv in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-06-2013, 02:19 PM
  3. Large Table with Duplicate Values - Minimum Value Needed
    By kma27 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-28-2012, 10:10 PM
  4. Large function with duplicate values
    By jrs362 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2012, 06:27 AM
  5. Large list w/ duplicate numbers
    By Dezhem in forum Excel General
    Replies: 0
    Last Post: 08-17-2011, 11:23 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