+ Reply to Thread
Results 1 to 6 of 6

Ranking Function based on number of cells

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    50

    Ranking Function based on number of cells

    hi,

    I have a ranking function which ranks a cell based on a certain number using the following code:

    Please Login or Register  to view this content.
    The problem is if a cell in column N has two instances which are the same for each of the three cells you will get the same rank number. Ill explain by trying to represent the output:

    Column C Column F Column N ActiveCell (with formula)
    D x 2 1
    D x 3 3
    D x 2 1
    D y 6 1
    E x 8 1

    The 1st and 3rd ceels both have the lowest value and hence get a 1 and therefore the 2nd lowest value gets a 3. What I would like is a function which outputs based on number size and if both the same then the first instance gets a 1, the second instance a 2 and so on resulting in:

    Column C Column F Column N ActiveCell (with formula)
    D x 2 1
    D x 3 3
    D x 2 2
    D y 6 1
    E x 8 1

    Can somebody please help as this is bugging me and I cant find a way around it.

    Thanks,
    Dave
    Last edited by kinseld5; 03-29-2013 at 12:25 PM.

  2. #2
    Registered User
    Join Date
    01-12-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Ranking Function based on number of cells

    bump no response

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,655

    Re: Ranking Function based on number of cells

    Can you upload an example fileand do not forget to write your expected result?
    Quang PT

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

    Re: Ranking Function based on number of cells

    See the attachment
    Attached Files Attached Files

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,655

    Re: Ranking Function based on number of cells

    I can see that the formula in O column is OK with your expectance?

  6. #6
    Registered User
    Join Date
    01-12-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Ranking Function based on number of cells

    nflsales,

    Thank you for your help. you have saved me hours of processing work. Kind of disappointed I didnt think of your method but works perfectly.
    Really appreciate it. Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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