+ Reply to Thread
Results 1 to 5 of 5

Formula to Rank Values in Descending Order

  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    California, United States
    MS-Off Ver
    Excel 2010
    Posts
    17

    Formula to Rank Values in Descending Order

    Hello,

    I am requesting your help...

    In the attached workbook, I am in need of a formula that will accomplish 2 things:

    1) Rank Units (column B) in descending order, based on department (column A).

    AND

    2) If there are duplicate values in the Units column, then look to the Sales (Column C) to decide the rank.

    I have already accomplished the first part with the formula in Column D and the second part with the formula in Column E.

    What I'm looking for is a single formula in Column F that will accomplish both of these things!

    THANK YOU,

    Brent
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to Rank Values in Descending Order

    Try this array formula** entered in D3 and copied down:

    =SUM(IF(A$3:A$32=A3,IF(B$3:B$32>B3,1)))+SUMPRODUCT(--(A$3:A$32=A3),--(B3=B$3:B$32),--(C3<C$3:C$32))+1

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: Formula to Rank Values in Descending Order

    There are lots of examples of ranking formulae on Chip Pearson's site, here:

    http://www.cpearson.com/Excel/rank.aspx

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-11-2010
    Location
    California, United States
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Formula to Rank Values in Descending Order

    Wow, Tony! That worked PERFECT. Exactly what I was looking for. That would have taken me forever to figure out. THANK YOU!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to Rank Values in Descending Order

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. Validate if values associated with the same part number are in descending order
    By forbesk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2014, 03:47 PM
  2. Replies: 3
    Last Post: 01-05-2013, 11:06 AM
  3. [SOLVED] Rank values in descending order with duplicates
    By mcain1981 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-14-2012, 01:15 PM
  4. Sorting in descending order and show duplicate values
    By cceze in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-19-2012, 09:33 AM
  5. Replies: 14
    Last Post: 04-17-2012, 05:18 PM
  6. Rank amounts and duplicated in descending order
    By jimstrongy in forum Excel General
    Replies: 3
    Last Post: 01-19-2012, 03:29 PM
  7. Rank Table in descending order
    By Merv in forum Excel General
    Replies: 6
    Last Post: 12-17-2009, 01:22 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