+ Reply to Thread
Results 1 to 5 of 5

Conditional RANK using dynamic array function

  1. #1
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Conditional RANK using dynamic array function

    Hi,

    I have a table with three columns and need to create a conditional rank, like this:

    =SUMPRODUCT(($A$2:$A$67=$A2)*($C$2:$C$67=$C2)*($B$2:$B$67<$B2)/COUNTIFS($A$2:$A$67,$A$2:$A$67,$C$2:$C$67,$C$2:$C$67,$B$2:$B$67,$B$2:$B$67))+1

    This formula needs to be copied down and adjusted to cover the whole dataset and it will quickly become heavy to calculate.

    Does anybody have an alternative formula using dynamic array functions that produce a spill range to cover the dataset?

    Best regards,
    Marbleking
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Conditional RANK using dynamic array function

    Please try

    =COUNTIFS(A2:A67,A2:A67,B2:B67,"<="&B2:B67,C2:C67,C2:C67)
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Conditional RANK using dynamic array function

    Hi Bo_Ry,

    Thanks for this. Your formula gives different results than the one I had before when there are duplicate rows. Please see attached workbook with slightly different raw data. The first one I sent contained only unique rows, which isn't always the case.

    Best regards,
    Marbleking
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Conditional RANK using dynamic array function

    Please try

    =LET(z,A2:A30&C2:C30&B2:B30,u,SORT(UNIQUE(z)),MATCH(z,u,)-MATCH(A2:A30&C2:C30&"*",u,))+1
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Conditional RANK using dynamic array function

    Thanks, Bo_Ry! Nice!

+ 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. Conditional MIN and RANK using dynamic array formulas
    By Marbleking in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-11-2021, 04:42 AM
  2. [SOLVED] Conditional MAX and RANK of 18-digit text numbers using dynamic array formulas
    By Marbleking in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2021, 07:41 AM
  3. How to coerce array passed to RANK function?
    By RaulSerg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-28-2020, 04:18 PM
  4. [SOLVED] Using rank function in an array
    By rhysspinner in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-22-2015, 09:15 AM
  5. [SOLVED] Rank with conditional array
    By Bob Macregor in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-26-2014, 12:22 PM
  6. Applying RANK function to a conditional range
    By MrO1976 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2013, 11:16 AM
  7. RANK function and Array Formula Error
    By Sparky12 in forum Excel General
    Replies: 4
    Last Post: 02-28-2009, 05:46 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