+ Reply to Thread
Results 1 to 5 of 5

Rank by date and type

  1. #1
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Rank by date and type

    I'm trying to rank by dates by category change.

    I have two object in my list: unicorns and rainbows in column B. Each also has a date in an adjacent column A.

    How do I generate a rank for each date, by change in object?

    unicorn express.xlsx

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Rank by date and type

    In C5, enter =(SUMPRODUCT(($B$5:$B$9=B5)*($A$5:$A$9>A5))+1)+COUNTIFS($A$5:A5,A5,$B$5:$B5,B5)-1 then drag it down

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

    Re: Rank by date and type

    Will your data always be sorted like that shown in your example? If so you can use this formula in C5:

    =COUNTIF(B5:B$9,B5)

    then copy it down.

    Hope this helps.

    Pete

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Rank by date and type

    Okay JieJenn, that was amazing.

    Can it do reverse order rank? Or is there a workaround for it?



    Solved it myself a few minutes later:

    It's ugly, but doable.

    =COUNTIF($A$3:$A$4000,A3)-((SUMPRODUCT(($A$3:$A$400=A3)*($D$3:$D$400>D3))+1)+COUNTIFS($D$3:D3,D3,$A$3:$A3,A3)-1)+1
    Last edited by daffodil11; 08-13-2013 at 06:11 PM.

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Rank by date and type

    Change ($A$5:$A$9<A5) to ($A$5:$A$9>A5)

    =(SUMPRODUCT(($B$5:$B$9=B5)*($A$5:$A$9>A5))+1)+COUNTIFS($A$5:A5,A5,$B$5:$B5,B5)-1

+ 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. Converting Bianary Type Date from MSSQL to date in Excel
    By Demaestro in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-15-2013, 04:06 PM
  2. Rank a column depending on date selected
    By john_london in forum Excel General
    Replies: 7
    Last Post: 09-12-2012, 07:58 AM
  3. Revenue Rank & Date Calculations
    By dlythgoe in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-12-2009, 06:22 AM
  4. Rank by value and date?
    By bobboy in forum Excel General
    Replies: 3
    Last Post: 02-20-2007, 08:48 PM
  5. Replies: 1
    Last Post: 08-15-2005, 05:05 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