+ Reply to Thread
Results 1 to 33 of 33

Formula to create a ranking out of several variables

  1. #1
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Question Formula to create a ranking out of several variables

    Hi guys,

    I need to do a ranking based on several variables with predefined ranks. I.e. I have 4 Variables with different numbers. Depending on the amount of each variable, a person ranks up or not. so i need to find a formula that does the matching for me. Can you help me?

    I attached a workbook with two sheets in it. 1. Ranking Structure, and 2. Report with data (the report I have has about 1000 entries)
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to create a ranking out of several variables

    Since the values in variable 3 and variable 4 are unique ranking by just one of those two columns would identify which ranking title to assign, thereby making ranking of the other three coloumns irrelevant.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Formula to create a ranking out of several variables

    with shares not numbers
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Hi Tim201110, Hi Special-K,

    Thank you for your help, unfortunately, I am not sure if you guys understood me correctly. The issue I face is that I have a report with lots of data. I now need to rank this data in a preset rank structure provided in the ranking sheet. There are 21 predefined ranks which are based on 4 variables. For example, you get Rank 7 if you have a minimum of 6 in Variable 1, 72'000 in variable 2, 75 in Variable 3, 30 in variable 4. As soon as you reach all the requirements of Rank 8 you rank up.

    I now need a formula for the Column F in the sheet Report, which gives shows me what Rank (1-21) from the Ranking tab applies to that user.

    Unfortunately i think neither of your solutions fit my need. Is there any other option?

  5. #5
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Formula to create a ranking out of several variables

    still not clear:
    var1?
    what to do if positions are not the same?
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    05-06-2016
    Location
    Cluj, Romania
    MS-Off Ver
    2007-2010
    Posts
    220

    Re: Formula to create a ranking out of several variables

    Hi,
    take a look at attachment and says if that is what you want
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Hey TudyBTH, sorry for my late answer. That's exactly what I needed!

    Thanks a lot for your help!

  8. #8
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Quote Originally Posted by TudyBTH View Post
    Hi,
    take a look at attachment and says if that is what you want
    Hey TudyBTH,

    I just realised that I cannot use your doc since it has an error when it comes to the lower ranks... Can you check again and see if there is another option for the Formula to return the right answers?

    I tried the AND function but that doesn't work either.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    05-06-2016
    Location
    Cluj, Romania
    MS-Off Ver
    2007-2010
    Posts
    220

    Re: Formula to create a ranking out of several variables

    I'm sorry but I do not understand very well what are the criteria for ranking. Please fill column manually with the correct values.

  10. #10
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Quote Originally Posted by TudyBTH View Post
    I'm sorry but I do not understand very well what are the criteria for ranking. Please fill column manually with the correct values.
    Hi TudyBTH,

    Thanks for the answer. I wrote next to the ones that are wrong which Rank title they should have. See Excel Attached.

    Thanks for your help!
    Attached Files Attached Files

  11. #11
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Formula to create a ranking out of several variables

    Try this ...

    =INDEX(Ranking!$F$3:$F$25,MATCH(1,(E2>=Ranking!$B$3:$B$25)*(Report!D2>=Ranking!$C$3:$C$25)*(Report!B2>=Ranking!$D$3:$D$25)*(Report!C2>=Ranking!$E$3:$E$25),0))

    Enter with Ctrl+Shift+Enter

  12. #12
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Quote Originally Posted by Phuocam View Post
    Try this ...

    =INDEX(Ranking!$F$3:$F$25,MATCH(1,(E2>=Ranking!$B$3:$B$25)*(Report!D2>=Ranking!$C$3:$C$25)*(Report!B2>=Ranking!$D$3:$D$25)*(Report!C2>=Ranking!$E$3:$E$25),0))

    Enter with Ctrl+Shift+Enter
    Hi Phuocam,

    Thanks a lot for your quick answer... unfortunately that doesn't seem to work for everything. I slightly changed your formula and attached it to the doc so it would fit my report. In Tab Passive ranks in line 2 there should be rank 3 if I am correct. What am I doing wrong?
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Formula to create a ranking out of several variables

    H2 = 1 -> not Rank 3

  14. #14
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    I've been too long at this... can't even see straight anymore Thanks a lot!

  15. #15
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Formula to create a ranking out of several variables

    You are welcome, good luck!

  16. #16
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    I do have another question however... do you know why there is a few #N/As in there? there shouldn't be? they should be Rank1, no?

  17. #17
    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,830

    Re: Formula to create a ranking out of several variables

    Check all your data for leading and trailing spaces - they knock formulae out of whack.
    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.

  18. #18
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    I did... I checked the document I attached to my last post, but couldn't find any leading or trailing spaces... Is there another possibility?

  19. #19
    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,830

    Re: Formula to create a ranking out of several variables

    #N/A suggests that one or more of the data items the formula is looking at is not in the correct format. In other words, it can't find relevant data for one or more of its processes. Try stepping through the formula using the Show Calculation Steps tool on the Formulas ribbon.

  20. #20
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Quote Originally Posted by AliGW View Post
    #N/A suggests that one or more of the data items the formula is looking at is not in the correct format. In other words, it can't find relevant data for one or more of its processes. Try stepping through the formula using the Show Calculation Steps tool on the Formulas ribbon.
    I tried... i do get that the error seems to be in the second part of the Formula, the MATCH one... but I can't figure out what is wrong...

    Would you mind having a quick look yourself into the excel?
    Attached Images Attached Images
    Attached Files Attached Files

  21. #21
    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,830

    Re: Formula to create a ranking out of several variables

    I'm sorry, I don't have time right now. Hopefully someone else can help. Maybe Phuocam, who helped with the formula, will have a look when he's back online.

  22. #22
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Thanks ... anyways, i liked your guidance. Let's hope Phuocam will be able to assist me

  23. #23
    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,830

    Re: Formula to create a ranking out of several variables

    Just one final thought: did you check the data in the ranking metrics tab for leading and trailing spaces?

  24. #24
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    yes i did.. there seems to be none in there that are not needed.

  25. #25
    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,830

    Re: Formula to create a ranking out of several variables

    What do you mean by "none that are not needed"? If you have ANY leading or trailing spaces, for whatever reason, they will cause your formulae to fail.

  26. #26
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    haha... sorry, I meant any spaces that aren't placed between Titles to make the words readable Correct answer would have been, there are NO leading or trailing spaces.

  27. #27
    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,830

    Re: Formula to create a ranking out of several variables

    Right, then you need to scrutinise the formula in B4. I suggest you work though it manually and find out what is missing from the ranking metrics tab: the formula is unable to find something it needs there. One or more of the values in D, E, F, G or H cannot be matched with the ranking metrics.

  28. #28
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    I just found the issue which cured everything but User 5.... so i'm one step closer. It was a simple reference to a shorter range than everyone else... now off to the last one

  29. #29
    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,830

    Re: Formula to create a ranking out of several variables

    There you go! It will be something similar.

  30. #30
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Formula to create a ranking out of several variables

    Hi Dlinen!

    Your formula:

    =INDEX('Ranking Metrics'!$F$3:$F$25,(MATCH(1,(D2>='Ranking Metrics'!$A$3:$A$25)*(E2>='Ranking Metrics'!$B$3:$B$24)*(F2>='Ranking Metrics'!$C$3:$C$25)*(G2>='Ranking Metrics'!$D$3:$D$25)*(H2>='Ranking Metrics'!$E$3:$E$25),0)))

    Change 24 to 25.

  31. #31
    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,830

    Re: Formula to create a ranking out of several variables

    Thanks for the rep!

  32. #32
    Registered User
    Join Date
    05-27-2016
    Location
    Zurich
    MS-Off Ver
    Office 2016
    Posts
    61

    Re: Formula to create a ranking out of several variables

    Thanks Phuocam! was figuring it out myself (took some time though )

    thanks a lot for your support!

  33. #33
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Formula to create a ranking out of several variables

    You are welcome, good luck!

+ 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. Create formula for multiple criteria ranking
    By DavidRoger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-04-2015, 03:50 AM
  2. Distinct sets with multiple variables using same formula and ranking -
    By mloffredo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2015, 08:45 PM
  3. Create a Formula from Set Variables as ActiveCell
    By lreyes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2015, 09:28 PM
  4. Ranking two variables
    By burgie10 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-06-2015, 08:53 PM
  5. Ranking Data based on multiple variables...
    By jasonkbu in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-08-2013, 10:00 AM
  6. [SOLVED] create a formula that covers several variables/possabilities
    By clovelly in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-31-2013, 07:35 AM
  7. Ranking cities on Multiple variables
    By Learn2earn in forum Excel General
    Replies: 1
    Last Post: 08-24-2012, 11:58 PM

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