Results 1 to 15 of 15

Frequency function to correct ranking instead of countif

Threaded View

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    Zurich
    MS-Off Ver
    Excel 2010
    Posts
    7

    Frequency function to correct ranking instead of countif

    Unresolved Cross post from :

    http://www.mrexcel.com/forum/excel-q...d-countif.html

    Hello,
    I have been using countif to rank numbers across +20 000 rows (+100 000 rows before data cleanup). Needless to say, this countif function is slowing down my model to a point it even crashes my excel. To fix this, I am trying to find a way to use the frequency function.

    Below is an example of the desired results using countif in column C :

    In C2, I use the classic : =COUNTIF(B$2:B2,B2)-1, which I copy down to the last row. (sorry but the paste and format functionalities on this site are not helping)

    A B C D
    1 values rank rank adjustment real rank
    2 100 7 0 7
    3 200 6 0 6
    4 300 5 0 5
    5 420 2 0 2
    6 500 1 0 1
    7 420 2 1 3
    8 310 4 0 4



    Now for the frequency version, the following forumula is wrong, but I understand it needs to look a little something like this, in C2 :

    {=SUM(IF(FREQUENCY(IF(B$2:B2<>"",IF(B$2:B2=B2,MATCH("~"&B$2:B2,B$2:B2&"",0))),ROW(B$2:B2)-ROW(B$2)+1),1))-1}


    Tons of thanks in advance for your kind help !

    Scott
    Last edited by Scottlarock; 08-01-2013 at 07:09 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Looking for a correct COUNTIF function
    By Smit22 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-26-2012, 02:02 PM
  2. Frequency + Ranking Function.
    By myteam in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-26-2010, 04:33 AM
  3. Counting frequency and ranking
    By themax16 in forum Excel General
    Replies: 3
    Last Post: 03-24-2009, 07:32 AM
  4. Formula 4 ranking by frequency
    By zenmanic in forum Excel General
    Replies: 1
    Last Post: 11-20-2008, 11:49 AM
  5. Ranking based on frequency
    By mac_see in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2006, 12:55 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