+ Reply to Thread
Results 1 to 5 of 5

Ranking a list with conditions

  1. #1
    Registered User
    Join Date
    12-06-2010
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2008
    Posts
    9

    Ranking a list with conditions

    Good Evening,

    I was wondering if I could get some help.

    I am putting together an excel spreadsheet where I need to rank scores of students who are auditioning for an honor orchestra. However, this audition will also count toward reaching the all-state orchestra level. Students have already registered as one of the following...honor orchestra only(HO), honor orchestra and all-state(BOTH), or all-state only(AS).

    All the students are listed on an excel database where their scores will be entered and tabulated. Then, using the RANK function, the overall ranking of their scores will be placed in a column so we can easily determine the order for their seats for only the Honor Orchestra.

    However, I would like to not include in the ranking the students who are only auditioning for the all-state level. I have a column set aside for listing which group they are auditioning for. I used the following formula:

    =IF(X5="AS"," ",(RANK(T5,$T$5:$T$49)))

    This ranks the students, and leaves a blank for those students who are not eligible for the honor orchestra. This creates the problem, however, that any number left blank is still included in the order. Thus, the ranking returned may look like this....1,2,3,_,_,_,7,8.

    We have a large number of students auditioning, so it will be difficult to determine the true ranking with these values just not printed in the cell.

    My question is:

    Is there a function (maybe COUNTIF?) that can be used to rank the students who meet the condition of auditioning for either the Honor Orchestra or Both but NOT the all-state orchestra only?

    Thank you in advance for ANY help you can give me.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Ranking a list with conditions

    Try like this

    =IF(X5="AS","",SUMPRODUCT(($X$5:$X$49<>"AS")*(T5<$T$5:$T$49))+1)

    which should work in any version of Excel......or you can use COUNTIFS available in Excel 2007 onwards, i.e.

    =IF(X5="AS","",COUNTIFS($X$5:$X$49,"<>AS",$T$5:$T$49,">"&T5)+1)
    Last edited by daddylonglegs; 12-06-2010 at 07:21 PM.
    Audere est facere

  3. #3
    Registered User
    Join Date
    12-06-2010
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2008
    Posts
    9

    Re: Ranking a list with conditions

    For whatever reason, the first one you posted is listing all of the results as 1, except for the AS ones which are empty.

    Would there be a reason for that...probably something I am doing?

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Ranking a list with conditions

    I'm not sure - are you definitely referencing the correct columns? See attached, I generated some random data - formulas are in columns Y and Z, press F9 to re-generate
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-06-2010
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2008
    Posts
    9

    Re: Ranking a list with conditions

    I figured out what I did...I transposed some numbers on the formula.

    I appreciate your help VERY much! I would not have figured this out without your help!

+ 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