+ Reply to Thread
Results 1 to 7 of 7

Ranking based on multiple criteria

  1. #1
    Registered User
    Join Date
    12-04-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Ranking based on multiple criteria

    Hello,

    I need a formula that auto-assigns a ranking to each row of data based on multiple criteria. The spreadsheet has fields for Sales Rep, Department Code, Close Date, and Value.

    I want the rankings to be grouped by Sales Rep (meaning that for each new sales rep, the rankings start over), then ranked by:

    1) Department Code (smallest to largest)
    2) Close Date (oldest to newest, blanks first)
    3) Value (largest to smallest)

    I've attached a sample data set (all data has been anonymized). My formula right now ranks by sales rep (which I don't want to be part of the ranking) then by department code, but I couldn't figure out how to rank by the three criteria and group by Sales Rep.

    Any help is appreciated!
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Ranking based on multiple criteria

    Hi km and welcome to the forum,

    I think I've accomplished what I think you've asked for. On the other hand, I'm not sure it is what you really want. See the attached Pivot Table where it has 3 groupings, sorted and a ranking column per your question above. I'd call this question "be careful what you ask for". Do you want to revise your question?

    PT Ranking with 3 groups.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    12-04-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Ranking based on multiple criteria

    I just found a SUMPRODUCT formula that groups by sales rep and then ranks by department code, but can I add other criteria onto the formula?

    The formula is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by km3033; 12-04-2017 at 12:49 PM.

  4. #4
    Registered User
    Join Date
    12-04-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Ranking based on multiple criteria

    Hi Marvin,

    I'm sorry, I should have been more specific. I'm not looking for a pivot table, but rather a column with the rankings. I just added a comment above about a sumproduct formula that gets me halfway there--I just need to add the two additional criteria into the formula.

    Thanks for your suggestions!

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Ranking based on multiple criteria

    Hi km,

    Can you add your formula to your workbook and attach it again. Then show what the final answer will be, in a few cases. I'm still not understanding the question. I do believe SumProduct will take more than 2 criteria. BUT - it needs the same number of rows to work with when it does the SumProduct.

  6. #6
    Registered User
    Join Date
    12-04-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Ranking based on multiple criteria

    I've reattached the data with the sumproduct formula I found and also a "Desired Ranking" tab (data slightly edited), which shows how I want the formula to rank the entries.

    Sometimes, the sales rep will have multiple entries with the same department code, so I want the formula to look at the next criteria--close date--to determine the ranking order. Additionally, sometimes the department codes and the close dates match, so I want the formula to then look at Value.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Ranking based on multiple criteria

    Looking at the "Desired Ranking" it appears that you want to group (sort) as well as rank. If that is the case then it would seem that, with the aide of a helper column (which may be moved and/or hidden for aesthetic purposes), this could be accomplished using a sort.
    The helper column, header "Modified Close Date (target)", is populated using the IF function i.e.: =IF(C2<>"",C2,0)
    The formula for the "Rank" column is: =IF(A2<>A1,1,SUM(F1,1))
    1) Select a cell in the data range,
    2) From the home tab select Sort&Filter > Custom Sort,
    3) Level 1: Sales Rep A to Z,
    4) Level 2: Dept. Entry smallest to largest,
    5) Level 3: Modified Close Date (target) oldest to newest,
    6) Level 4: Sales Amount largest to smallest
    7) Select OK
    Note: to test I removed the date (5/20/2016) from one of the entries assigned to KC in Dept 7000 (highlighted)
    If you only want to see the top 7, as indicated in the "Desired Ranking" tab, apply a filter to the "Rank" column and leave only 1 through 7 selected.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Create a table based on top ranking criteria, based on multiple fields.
    By stevensimon10482 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2017, 08:49 PM
  2. Ranking Question - Ranking based criteria but having forumla value issues
    By harp1983 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2016, 07:03 AM
  3. Ranking Based on Multiple Criteria
    By khannadh in forum Excel General
    Replies: 4
    Last Post: 09-02-2015, 08:20 PM
  4. Ranking Based on Criteria
    By mlbdc2012 in forum Excel Formulas & Functions
    Replies: 35
    Last Post: 02-26-2014, 01:07 PM
  5. Ranking Based on Three Criteria
    By annie82 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-28-2013, 01:21 AM
  6. [SOLVED] Finding Nth ranking value based on multiple criteria
    By scaffdog845 in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 04-26-2013, 01:00 PM
  7. Ranking based on certain criteria?
    By Ahmad Adha Ali in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2005, 04:51 AM

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