+ Reply to Thread
Results 1 to 4 of 4

=RANK applying nth instance of duplicate to next n; avoid sharing

  1. #1
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    =RANK applying nth instance of duplicate to next n; avoid sharing

    Data is vertically aligned, containing dates (formatted as mm/dd/yyyy) within the range BG68:BG213. Rank values are returned in each row, offset to Column BH.

    In this example, assume that the nearest date to today is shared by two instances; thus the =RANK returns a 1 for both, skips 2 and applies a 3 to the next newest date.

    I would like to have the 2nd instance of the 1 be a 2 and am happy to disregard the logic behind which of the two data points get the 1 and which gets the 2. Whichever occurs first in the vertical range gets the 1.

    I believe the following could be of assistance, I'm just struggling with the application.

    Link: http://www.excelforum.com/excel-work...s-in-rank.html

    Thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: =RANK applying nth instance of duplicate to next n; avoid sharing

    That link provides the solution for you in post #2. Just edit the ranges. You can do it. Pay attention to get the $ signs in the right places.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: =RANK applying nth instance of duplicate to next n; avoid sharing

    didnt read properly, sorry
    Last edited by FDibbins; 02-25-2012 at 09:27 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: =RANK applying nth instance of duplicate to next n; avoid sharing

    J, when applying the method via the link:

    1. The revised ranks contain duplicates; &
    2. Are in reverse order (oldest is ranked 1st, which should be switched).

    Please see attached dummy wb. Thanks!

    EDIT: Was attempting to apply the fix proposed in the final post, not Post #2. Changed order to 0. All is good.

    Thanks,
    Attached Files Attached Files
    Last edited by AlvaroSiza; 02-25-2012 at 10:37 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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