+ Reply to Thread
Results 1 to 8 of 8

How to Return Title of Row based on Ranking in Table?

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    81

    How to Return Title of Row based on Ranking in Table?

    Hi,

    So I have a table that has title for the categories in column B9:B23 and values in C9:D23. The values in the array C9:D23 have column titles of "X" & "Y". I want to find the 3 largest number in the array as well as the three smallest, which is not an issue. I want to know what the title is in B9:B23 that corresponds to these value, the current formula I have works fine unless there is a tie in the values. My question is if there a way I can have it so titles returned correspond to the values regardless of a tie, so if row 9,10,11 are tied it gives the titles corresponding to row 9,10,11 and not just 9.

    As a second question is there a way to get a similar return for the column titles "X" & "Y", so if C9 and D9 have the same value I can get the title that the large/small formula will return?

    I attached a sample workbook, the red highlighted box demonstrates the functionality issue I'm having.

    Demo.xlsx

    Thanks for the assist.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: How to Return Title of Row based on Ranking in Table?

    For the 3 top try array-entering this formula in I25 and filling down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    this one in J25 and filling down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    For the 3 worst array-enter this formula in I29 and filling down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and this one in J29
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Dave

  3. #3
    Registered User
    Join Date
    01-23-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: How to Return Title of Row based on Ranking in Table?

    That is exactly what I was trying to achieve, thank you very much! Much appreciated.

    Edit: I did notice one small hiccup, when column "I" has a tied value with Column "J" and the value in column "J" appears above "I" in the list it associates the top value in either column for the titles A-O and column X instead of it's corresponding Y title as it should.
    Last edited by Invicta084; 11-18-2015 at 09:00 AM. Reason: Additional help

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: How to Return Title of Row based on Ranking in Table?

    Hmmm. That hadn't occurred to me. I'll need to spend some time trying to work that detail out.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: How to Return Title of Row based on Ranking in Table?

    Try changing the array formula in J25:JJ27 to this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And the array formula in J29:J31 to this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    See the attached and please let us know how this does with "live" data.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: How to Return Title of Row based on Ranking in Table?

    BTW

    Not to compound the problem, but there is "tie" situation not covered yet.

    If there was a tie like this:

    Row\Col
    H
    I
    J
    8
    X Y
    9
    A
    0.724158159
    0.495911476
    10
    B
    0.545811272
    0.525129891
    11
    C
    0.803824078
    0.766274299
    12
    D
    0.12282898
    0.975814775
    13
    E
    0.709307208
    0.975814775
    14
    F
    0.832533562
    0.975814775
    15
    G
    0.14038092
    0.14038092
    16
    H
    0.239031558
    0.907789786
    17
    I
    0.330363801
    0.502124901
    18
    J
    0.844778913
    0.235364741
    19
    K
    0.940462218
    0.461518999
    20
    L
    0.892472335
    0.488730538
    21
    M
    0.414147825
    0.399032811
    22
    N
    0.318071703
    0.273043756
    23
    O
    0.401903223
    0.425155552


    how do you want this ranked? The above formulas will always return column X. The same is true if there were a 3-way tie like this:

    Row\Col
    H
    I
    J
    8
    X Y
    9
    A
    0.724158159
    0.495911476
    10
    B
    0.545811272
    0.525129891
    11
    C
    0.803824078
    0.766274299
    12
    D
    0.940462218
    0.975814775
    13
    E
    0.709307208
    0.975814775
    14
    F
    0.832533562
    0.975814775
    15
    G
    0.12282898
    0.12282898
    16
    H
    0.239031558
    0.907789786
    17
    I
    0.330363801
    0.502124901
    18
    J
    0.844778913
    0.235364741
    19
    K
    0.12282898
    0.461518999
    20
    L
    0.892472335
    0.488730538
    21
    M
    0.414147825
    0.399032811
    22
    N
    0.318071703
    0.273043756
    23
    O
    0.401903223
    0.425155552


    or this:

    Row\Col
    H
    I
    J
    8
    X Y
    9
    A
    0.724158159
    0.495911476
    10
    B
    0.545811272
    0.525129891
    11
    C
    0.803824078
    0.766274299
    12
    D
    0.940462218
    0.975814775
    13
    E
    0.12282898
    0.975814775
    14
    F
    0.832533562
    0.975814775
    15
    G
    0.12282898
    0.12282898
    16
    H
    0.239031558
    0.907789786
    17
    I
    0.330363801
    0.502124901
    18
    J
    0.844778913
    0.235364741
    19
    K
    0.709307208
    0.461518999
    20
    L
    0.892472335
    0.488730538
    21
    M
    0.414147825
    0.399032811
    22
    N
    0.318071703
    0.273043756
    23
    O
    0.401903223
    0.425155552


    or other.
    Last edited by FlameRetired; 11-18-2015 at 08:21 PM.

  7. #7
    Registered User
    Join Date
    01-23-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: How to Return Title of Row based on Ranking in Table?

    Tested the formulas in the live data, works great! I never could wrap my head around multiplying two thing in the if statements, starting to become clearer to me how it works.

    For the other tie situations, I think in my live data where there is a tie in the same row I am okay with it just returning the title "X".

    Thanks again FlameRetired been a huge help.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: How to Return Title of Row based on Ranking in Table?

    You are welcome. Thank you for the kind words and feedback.

+ 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] Return column title based on smallest value by row?
    By realrookie in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-29-2015, 12:58 PM
  2. [SOLVED] Return a Value in a Table based upon certain criteria
    By Staci in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2014, 08:02 PM
  3. Return a value from a table based on several other cells
    By Ranulor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2014, 01:05 PM
  4. [SOLVED] populating a table from a separate sheet based on ranking
    By greggatz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-21-2014, 02:54 PM
  5. Replies: 7
    Last Post: 01-25-2013, 05:17 PM
  6. Replies: 4
    Last Post: 10-19-2012, 12:09 PM
  7. Replies: 3
    Last Post: 09-30-2011, 03:29 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