+ Reply to Thread
Results 1 to 5 of 5

Rank with conditional array

  1. #1
    Registered User
    Join Date
    09-25-2014
    Location
    PEI, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Rank with conditional array

    I'm having some trouble with the Rank function in Excel 2007.
    I have a set of over 5100 crop production records with the critical fields being CROP, YEAR, CLIENT_ID, and ACT_YIELD. I would like to rank (descending) ACT_YIELD of the individual CLIENT_IDs by CROP and YEAR. I tried {=RANK(D2,IF(AND(A$2:A$88=A2,B$2:B$88=B2),D$2:D$88))} (with C.S.E.), but get the #VALUE! error. I've checked that the formatting is consistent in the columns, but maybe I've overlooked something(?).
    I'm attaching a dummy spreadsheet to demonstrate the issue. Any help with this problem would be greatly appreciated.
    Bob

    CropSample.xlsx

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Rank with conditional array

    =COUNTIFS($A$2:$A$88,$A2,$B$2:$B$88,$B2,$D$2:$D$88,">="&$D2)
    Try this formula
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Rank with conditional array

    May be this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  4. #4
    Registered User
    Join Date
    09-25-2014
    Location
    PEI, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Rank with conditional array

    Thanks, Siva. As long as I first sort the data by CROP, YEAR, and ACT_YIELD, this approach works great! A clever approach.
    Regards,
    Bob

  5. #5
    Registered User
    Join Date
    09-25-2014
    Location
    PEI, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Rank with conditional array

    Quote Originally Posted by boopathiraja View Post
    May be this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Sorry, but I don't follow this. What are the "--" in the formula? The solution offered by Siva worked fine, but I wanted to be clear on other possible approaches, too.
    Regards,
    Bob

+ 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. Rank With Array
    By John Vieren in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-21-2012, 04:58 PM
  2. VBA Rank for an Array
    By PNCD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2009, 08:17 PM
  3. Pass an array to Rank
    By Domenic in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 09-06-2005, 06:05 AM
  4. [SOLVED] Pass an array to Rank
    By Biff in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. [SOLVED] Pass an array to Rank
    By Biff in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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