+ Reply to Thread
Results 1 to 12 of 12

Display corresponding name for same number

  1. #1
    Registered User
    Join Date
    09-15-2018
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2003
    Posts
    4

    Display corresponding name for same number

    Hi all expert,

    I need help for my work.

    Problem :

    I have a team of 5 sales person. But when i used formula to list out the sales record in order, with sales person have the same numbers(119) it will only display the first names(Alan) for both records. It should display rank 3 as Melisa having same score as Alan.

    Example in Cell
    A B C D E F G H
    1 Name Product A Product B Total Rank Score Name
    2 Alan 90 29 119 1 199 Sam
    3 Richard 20 8 28 2 119 Alan
    4 Sam 98 101 199 3 119 Alan
    5 Teresa 0 0 0 4 28 Richard
    6 Melisa 66 53 119 5 0 Teresa

    I am using this formula : =INDEX($A$2:$A$6,MATCH(G2,$D$2:$D$6,0))

    Thanks alot in advance for your great help.

    Best regards
    Kc

    Thanks
    Last edited by kench; 09-16-2018 at 12:36 AM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Display corresponding name for same number

    One quick and easy way would be to use a helper column to create a unique rank.
    Column F in the attached uses this formula in F2 and copied down to achieve that.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Not the rank numbers in F2 & F6 even though these people have the same scores.

    Then use that rank to lookup the values into order.

    Hope that helps.

    BSB
    Attached Files Attached Files

  3. #3
    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,939

    Re: Display corresponding name for same number

    That was pretty much what I came up with too, BSB...
    =RANK($E2,$E$2:$E$6)+COUNTIF($E2:E2,$E2)-1
    copied down
    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

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Display corresponding name for same number

    Great minds think alike, Ford

    BSB

  5. #5
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Display corresponding name for same number

    Hi, my suggestion is an array formula
    Please Login or Register  to view this content.
    Regards.

  6. #6
    Registered User
    Join Date
    09-15-2018
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2003
    Posts
    4

    Re: Display corresponding name for same number

    Hi BadlySpelledBuoy & FDibbins

    Thanks alot, it helps.

    But can you spend a little bit more time to explain your formula,

    =RANK(E2,$E$2:$E$6)+COUNTIF(E$2:E2,E2)-1

    Thanks alot in advance

    Best regards
    Ken

  7. #7
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Display corresponding name for same number

    Hi Ken,

    The formula works by first ranking the scores using this part of the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And this part deals with tied scores:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This second part is counting how many times a value appears in an expanding range. Note the use of a $ in the first part of the range but not the second.
    So it's checking how many times does the value in E2 appear in the range E2:E2. Answer = 1.
    By the time this formula gets down to row 6 it's checking how many times does the value in E6 appear in the range E2:E6. Andswer = 2.

    If you add that to the RANK part of the formula you get unique rankings. However your rankings would start at 2 rather than 1. So the -1 at the end of the formula deals with that.

    Have a look at the attached where I've broken it down into separate columns.
    Col L shows the result of the RANK section.
    Col M shows the result of the COUNTIF section.
    Col N shows the COUNTIF -1.
    Col O shows the result of adding L & N together (or the same as the full formula provided earlier).

    Does that help explain it at all?

    BSB

  8. #8
    Registered User
    Join Date
    09-15-2018
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2003
    Posts
    4

    Re: Display corresponding name for same number

    Hi BadlySpelledBuoy,

    Very nice and clear explaination.

    Appreciate your great help.

    It really helps me alot in my excel.

    Thanks alot.

    Best regards
    Ken

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,978

    Re: Display corresponding name for same number

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  10. #10
    Registered User
    Join Date
    09-15-2018
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2003
    Posts
    4

    Re: Display corresponding name for same number

    Hi AliGM,

    Thanks for the guidance.....I have marked this thread as Resolved.

    Best regards
    Ken

  11. #11
    Registered User
    Join Date
    07-15-2023
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    1

    Re: Display corresponding name for same number

    Hi. May I ask if there are other way to do it?

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,978

    Re: Display corresponding name for same number

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

+ 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] How to correctly display the correct calculated number and mask away exceeding number
    By Andrew88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2017, 07:44 AM
  2. If a cell begins with a 5 display that number if not display nothing
    By tia814 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-02-2016, 07:09 AM
  3. Number format to Display 20 character long number.
    By SamCV in forum Excel General
    Replies: 6
    Last Post: 07-09-2014, 08:19 PM
  4. If number is Positive display in D20, if Number is negative display in D19
    By jlawrence123 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-13-2014, 09:07 AM
  5. Replies: 11
    Last Post: 04-17-2012, 09:41 AM
  6. Replies: 5
    Last Post: 11-22-2010, 06:31 PM
  7. display total above certain number and display
    By MGD in forum Excel General
    Replies: 3
    Last Post: 03-04-2006, 01:03 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