+ Reply to Thread
Results 1 to 4 of 4

Issues with duplicate numbers when looking for 3 highest numbers and non-ajdacent text

  1. #1
    Registered User
    Join Date
    12-23-2012
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    2

    Issues with duplicate numbers when looking for 3 highest numbers and non-ajdacent text

    I need to find the three highest values in a column and return these values, along with corresponding text in non-adjacent cells, to another area of the spreadsheet.

    In cell Z5, I'm using the large function to find the highest value: =LARGE($G$4:$G$29,1) (Z6 and Z7 contain the next higher numbers in descending order).

    In cell AA5 I'm using this array to return the text: =IF(ROWS($2:$2)<=COUNTIF($G$4:$G$29,Z5),INDEX($B$4:$B$29,SMALL(IF($G$4:$G$29=Z5,ROW($G$4:$G$29)-MIN(ROW($G$4:$G$29))+1),ROWS($2:$2))),"")

    The text is located in column B, the numbers in column G.

    The two formulas work until the large function returns duplicate numbers. Then the text to the first number is repeated as the text for the second duplicate number. How do I alter this formula (or write a simpler one) to ensure the corresponding text is copied with the duplicate numbers?

    Many thanks for the help!

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

    Re: Issues with duplicate numbers when looking for 3 highest numbers and non-ajdacent text

    hi tmmo and welcome to the forum

    you need to create a helper column and use a formula to generate tie-breakers. something like...

    =IF(COUNTIF($g$2:g2,g2)=1,g2,g2+(g2*COUNTIF($g$2:g2,g2)*0.01))
    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-23-2012
    Location
    Houston
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Issues with duplicate numbers when looking for 3 highest numbers and non-ajdacent text

    Your suggestion did the trink (why didn't I think of that??). Thank you for the very quick, useful response.

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

    Re: Issues with duplicate numbers when looking for 3 highest numbers and non-ajdacent text

    Happy to help

    please consider point 3 below

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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