+ Reply to Thread
Results 1 to 13 of 13

Complicated ranking off of multiple variables formula

  1. #1
    Registered User
    Join Date
    01-26-2017
    Location
    Tampa, FL
    MS-Off Ver
    excel 2007
    Posts
    14

    Complicated ranking off of multiple variables formula

    Hey there,

    I'm trying to create a ranking and quintile off of multiple criteria (consider these columns a, b, c, d, e)

    Essentially I want to do the following

    1. Create a ranking *(Column D) based off of the Usage value (column C) by item (Column B) against how each location (Column A) perform for that particular item (Column B)

    2. I then would likely create a quintile ranking (Column E) of numbers (1,2,3,4,5) based of of those ranking values

    The formula for this is way over my head and i'm not sure it's even possible! Help Please

    obviously there is much more data than this, Its normally around 200K rows, this is just a snipit example that I would hopefully be able to drag the formula's down for

    Column A - Location
    Column B - Item
    Column C - Usage
    Column D - Rank
    Column E - Quintile Rank

    location item Usage rank quintile
    a 1 0.25
    a 2 0.65
    a 3 0.47
    b 1 0.60
    b 2 0.68
    b 3 1.00
    c 1 0.52
    c 2 0.08
    c 3 0.63
    d 1 0.17
    d 2 0.15
    d 3 0.31
    e 1 0.42
    e 2 0.11
    e 3 0.19
    f 1 0.02
    f 2 0.28
    f 3 0.53
    Last edited by broman5000; 03-07-2018 at 10:38 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Complicated ranking off of multiple variables formula

    How about starting with pivot table with locations in rows and items in columns headers (or may be in filter field) and volume in data filed?
    Then you would have at least chance to prepare first step - ranking of how each location performed in each item.

    By the way - attachment (workbook) with sample data and sample (manually assessed) output is almost always a good idea.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-26-2017
    Location
    Tampa, FL
    MS-Off Ver
    excel 2007
    Posts
    14

    Re: Complicated ranking off of multiple variables formula

    Hey Kaper,

    I tried that, but then I have a pivot table with 500+ columns and 70+ rows (file is too big to attach)
    I've seen where someone has tried a sumproduct or countif formulas to do this, but I tried and I've been unsuccessful
    I was hoping just to write a formulas in column D and E and drag down...Should I think about concatenating to get uniques?

  4. #4
    Registered User
    Join Date
    01-26-2017
    Location
    Tampa, FL
    MS-Off Ver
    excel 2007
    Posts
    14

    Re: Complicated ranking off of multiple variables formula

    For example to show on the ranking

    location item Usage rank quintile
    a 1 0.25 3
    a 2 0.65 5
    a 3 0.47 3
    b 1 0.60 6
    b 2 0.68 6
    b 3 1.00 6
    c 1 0.52 5
    c 2 0.08 1
    c 3 0.63 5
    d 1 0.17 2
    d 2 0.15 3
    d 3 0.31 2
    e 1 0.42 4
    e 2 0.11 2
    e 3 0.19 1
    f 1 0.02 1
    f 2 0.28 4
    f 3 0.53 4

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Complicated ranking off of multiple variables formula

    Even if not attachment (with small but representative subset of data with real delicate info replaced by dummy names) then
    Quote Originally Posted by Kaper View Post
    attachment (workbook) with sample data and sample (manually assessed) output is almost always a good idea.
    is (at least for me in this case)_ needed to understand what you want to achieve.

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Complicated ranking off of multiple variables formula

    Or may be I misunderstood you.
    Because besides column E (here my question about what is expected output) you were also asking in post #1 about formula for column D (rank)

    It could be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Kaper; 03-08-2018 at 12:13 PM.

  7. #7
    Registered User
    Join Date
    01-26-2017
    Location
    Tampa, FL
    MS-Off Ver
    excel 2007
    Posts
    14

    Re: Complicated ranking off of multiple variables formula

    So I tried that and It doesn't pull down correctly...I think it has to do with the fact that it isn't referencing anything in column A (The location)...Let me ask this differently (See below)

    I would need to rank each item performance (Column B) based off of its usage (column C) relative to those same items (Column B) from other locations (Column A)

    So for example below (Location 1, Item 3 has a usage of 20%, which puts it at a rank of 2 as it is the 2nd lowest of that certain item as it compares to how each store is using that item)

    excel help.PNG
    ​​​​​​​Does that help?

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

    Re: Complicated ranking off of multiple variables formula

    Pics and screenshot are seldom of any use. Post an actual Excel workbook ... saves retyping data.

    If you are not familiar with how to do that:

    To attach a file to your post,
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  9. #9
    Registered User
    Join Date
    01-26-2017
    Location
    Tampa, FL
    MS-Off Ver
    excel 2007
    Posts
    14

    Re: Complicated ranking off of multiple variables formula

    I think i uploaded it correctly, do you see it?
    Attached Files Attached Files

  10. #10
    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,036

    Re: Complicated ranking off of multiple variables formula

    ONE manually calculated result is not that helpful, a few would have been better...

    But try:

    =COUNTIFS($B$2:$B$31,B2,$C$2:$C$31,"<"&C2)+1
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  11. #11
    Registered User
    Join Date
    01-26-2017
    Location
    Tampa, FL
    MS-Off Ver
    excel 2007
    Posts
    14

    Re: Complicated ranking off of multiple variables formula

    This is awesome and it worked perfectly! Do you know how I would do the quintile formula based off of this results in the next column?

  12. #12
    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,036

    Re: Complicated ranking off of multiple variables formula

    Yep. try this array formula:

    =MATCH(C2,PERCENTILE(IF(B2=$B$2:$B$33,$C$2:$C$33),{0,0.2,0.4,0.6,0.8}),1)

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...






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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    01-26-2017
    Location
    Tampa, FL
    MS-Off Ver
    excel 2007
    Posts
    14

    Re: Complicated ranking off of multiple variables formula

    This is great, thank you so much!

+ 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. ranking by two variables
    By gramirez326 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2016, 08:32 PM
  2. Formula to create a ranking out of several variables
    By Dlinen in forum Excel Formulas & Functions
    Replies: 32
    Last Post: 07-15-2016, 08:13 AM
  3. 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
  4. Ranking two variables
    By burgie10 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-06-2015, 08:53 PM
  5. Formula to work out complicated matrix based on multiple variables
    By Nesuke in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2013, 09:05 AM
  6. Ranking Data based on multiple variables...
    By jasonkbu in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-08-2013, 10:00 AM
  7. Ranking cities on Multiple variables
    By Learn2earn in forum Excel General
    Replies: 1
    Last Post: 08-24-2012, 11:58 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