+ Reply to Thread
Results 1 to 11 of 11

Ranking based on 3 columns (values)

  1. #1
    Registered User
    Join Date
    07-12-2018
    Location
    Prague
    MS-Off Ver
    O365
    Posts
    4

    Ranking based on 3 columns (values)

    Dear experts in macros,

    I would like to kindly ask you for your advise and help.
    I need to the ranking based on 3 columns (values).

    Rank values from the first column (B) in the descending matter (that means : the highest value has the rank 1.)
    If values in first column (B) are the same, then rank values in second column (C). Here the same, if higher, then rank as 1.
    If values in first column (B) and second column (C) are the same, then rank values in third column (D). Again, if higher, then rank as 1.

    Explanation. Table is for tenis tournament, column B is for Points per wins (calculated by some my metrics), column C is for difference of Sets (win - lost) and column D is for difference of Games (win - lost).
    Here is image which describes how it looks like and also manually done ranking how the rating should looks like.
    screen.png

    Many thanks for your help and share your great knowledge and experience

  2. #2
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Ranking based on 3 columns (values)

    Must this be a VBA solution? If so, I will move the thread.
    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.

  3. #3
    Registered User
    Join Date
    07-12-2018
    Location
    Prague
    MS-Off Ver
    O365
    Posts
    4

    Re: Ranking based on 3 columns (values)

    No, please Formula.

  4. #4
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Ranking based on 3 columns (values)

    So why do you need members who are expert in macros???

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  5. #5
    Registered User
    Join Date
    07-12-2018
    Location
    Prague
    MS-Off Ver
    O365
    Posts
    4

    Re: Ranking based on 3 columns (values)

    Sorry, my mistake in titeling of masters here.
    Please cancel this thread.

  6. #6
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Ranking based on 3 columns (values)

    There is no need to cancel the thread! Just provide the workbook and we shall take it from there.

  7. #7
    Registered User
    Join Date
    07-12-2018
    Location
    Prague
    MS-Off Ver
    O365
    Posts
    4

    Re: Ranking based on 3 columns (values)

    I really Appologise. It seems to be that I found the solution. I hope.
    Really sorry for creating new thread. If possible, please remove this thread to not make mess here.
    Many thanks for your support.

  8. #8
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Ranking based on 3 columns (values)

    No, the thread will not be deleted, and if you have found a solution, you should post it here for the benefit of anyone else looking for a similar solution.

    I was merely trying to clarify what you were looking for.

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Ranking based on 3 columns (values)

    With a helper column, if your data is representative points*100+sets*10+games should give a column that can be ranked with the rank function to get what you desire. AS you have not attached a sheet of given references I can not be more explicit with a formula, it may be b2*100+c2*10+d2

  10. #10
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,397

    Re: Ranking based on 3 columns (values)

    The OP has found a solution, which I have asked him/her to post.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: Ranking based on 3 columns (values)

    I've been away doing other things, forgetting to post my offering. I'm posting it now, just in case it's useful to someone else. I randomised the rows a bit, as the OP's sample was already in rank order.

    =SUMPRODUCT(--((($B$2:$B$8*100)+(C$2:$C$8*10)-$D$2:$D$8)>=(B2*100)+(C2*10)-D2))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

+ 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. Replies: 7
    Last Post: 10-21-2016, 06:16 PM
  2. [SOLVED] Ranking based on two columns
    By kabnt2005 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-12-2016, 08:41 AM
  3. [SOLVED] Ranking formula based on values in multiple columns taken from a different sheet
    By m_t in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-15-2016, 03:52 PM
  4. [SOLVED] Assign a Ranking Score Based on Values in Other Columns
    By reluctantresearch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2014, 11:08 AM
  5. Ranking based on two columns
    By leo73pk in forum Excel General
    Replies: 6
    Last Post: 01-01-2011, 12:47 PM
  6. Ranking based on two columns
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-21-2006, 02:21 PM
  7. Ranking based on two columns
    By sa02000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2006, 01:10 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