+ Reply to Thread
Results 1 to 9 of 9

Rank if

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Rank if

    Hi all, I need some help with my rank function.

    I need to rank the value in BA4 against the values in BA4:BA4000

    That part is easy enough, but I only want to rank the values in BA4:BA4000 where the value of AF4 is found in AF4:AF4000.

    Basically a function that says rank value BA4 against values in BA4:BA4000 where the value in AF4 is also found in AF4000

    Hope this is easy enough to understand?

  2. #2
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: Rank if

    Hi cmb80

    this could be done by adding a helper column. see the attatch file
    Attached Files Attached Files
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Rank if

    where the value of AF4 is found in AF4:AF4000.
    How could the value in AF4 not be found in AF4:AF4000? It's in AF4!
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    09-22-2009
    Location
    Cornwall, England
    MS-Off Ver
    Excel 2010 (Work) O365Home (Home)
    Posts
    94

    Re: Rank if

    Please Login or Register  to view this content.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,698

    Re: Rank if

    Quote Originally Posted by ChemistB View Post
    How could the value in AF4 not be found in AF4:AF4000? It's in AF4!
    I assume the intent is to rank by category, that could be done using this formula in row 4 copied down

    =SUMPRODUCT((BA$4:BA$4000>BA4)*(AF4=AF$4:AF$4000))+1

    change > to < to rank ascending
    Audere est facere

  6. #6
    Registered User
    Join Date
    06-18-2012
    Location
    Blore
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Rank if

    Hi,
    I am new to this forum & thought I ll post it here rather than start a new thread.
    I have revenue in Column A that needs to be ranked from 1 - 1000. However, it needs to be ranked depending on time period. In column B, I have the time period from 2010 - 2012. I need to only rank those revenues that belong to 2012. I cant think of a way of modifying the sumproduct formula. Any help will be greatly appreciated.

    Rgds

    Quote Originally Posted by daddylonglegs View Post
    I assume the intent is to rank by category, that could be done using this formula in row 4 copied down

    =SUMPRODUCT((BA$4:BA$4000>BA4)*(AF4=AF$4:AF$4000))+1

    change > to < to rank ascending

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Rank if

    @quickgun

    post your question in a new threat.

    You get better help if you post an Excel-example of your workbook, without confidential information.

  8. #8
    Registered User
    Join Date
    06-18-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Rank if

    @ quickgun, I agree with oeldere, you could've posted your problem in a new thread instead.

    However, few quick steps to your problem:-
    1. Apply filter or format your data as table, now filter 2012 values. (you can also apply Pivot)
    2. Further you can sort your data in column B by values (Largest to smallest).
    Apply Sl. Nos. in adjacent column, and you have your ranks.

  9. #9
    Registered User
    Join Date
    06-18-2012
    Location
    Blore
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Rank if

    Thanks Oeldere & Fahads_neo. I got my answer. Used Sumproduct for this purpose.

+ 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