Finding rank of passed students excluding the failed ones in Mark-sheet.

sooshil

Board Regular
Joined
Feb 21, 2013
Messages
104
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have prepared Mark-Sheet of the students appeared in an exam. I have successfully calculated Total, Percentage, Division, Result (Pass/Fail). I wanted to calculate Rank of the all the passed students.
Since my sheet contains all the the rows (Passed as well as failed students) mixed up.
=Range(number,ref,[order])
Range function asks me for the reference and which I selected all the total marks of all students. But, I need to exclude the failed students' total as they couldn't be awarded any rank.
So, how can I do that? Please help

Thank you.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
There is a really simple, but not so beautiful, way to do this. I would make another row (we'll say column C for this example) with the following formula in C1:

Code:
=IF(A1 = "FAIL", "", B1)

In this example, A1 is the first row in the results column, FAIL is the value used in the results row for fail, and B1 is the first row in the column you are using to rank the students. Your RANK() (I assume you meant Rank and not Range in your post) function will then be:

Code:
=RANK(C1, $C$1:$C$9999999, 0)

Where C1 is the first row in the newly created column, $C$1:$C$9999999 is the length of the column (I'd recommend using a named range here that adjusts with the number of students entered), and 0 directing it to use descending order (1 for ascending which is not relevant for this ranking).

The formula we created will output #VALUE! in your rank row for all failing students and will properly rank the rest of the students. You can use a conditional format to hide the #VALUE! cells using a formula such as this:

Code:
=IF(ISERR($AA:$AA) = TRUE, TRUE, FALSE)

And setting the text color of this conditional format to the color of your background (white, by default). Also feel free to hide the newly created row.
 
Upvote 0
Do you mean RANK function?

Anyway, there should be a failing score where any score at or below the failing score is defined as FAIL, right?

you may try something like:
=IF(Result="Fail","",RANK(score,RangeForScore))
'assume you rank the score in descending order
Pls adjust the reference/Range for Result, Score, and RangeForScore accordingly.



I have prepared Mark-Sheet of the students appeared in an exam. I have successfully calculated Total, Percentage, Division, Result (Pass/Fail). I wanted to calculate Rank of the all the passed students.
Since my sheet contains all the the rows (Passed as well as failed students) mixed up.
=Range(number,ref,[order])
Range function asks me for the reference and which I selected all the total marks of all students. But, I need to exclude the failed students' total as they couldn't be awarded any rank.
So, how can I do that? Please help

Thank you.
 
Upvote 0
=IF(Result="Fail","",RANK(score,RangeForScore))

I believe the issue with this solution is that the RangeForScore is used to generate the rank so even if the failed students are not displayed, their ranks are still calculated which does not produce the desired results.
 
Upvote 0
Say the score from 20 to 100 and the pass score is 50.

Although the RANK function ranks every score (including those failing scores), the ranking won't be affected. For example, if John's score is 51 and is ranked as 21st; the rank remains the same EVEN if we have all the scores in the RangeForScore. Isn't it?


I believe the issue with this solution is that the RangeForScore is used to generate the rank so even if the failed students are not displayed, their ranks are still calculated which does not produce the desired results.
 
Upvote 0
Although the RANK function ranks every score (including those failing scores), the ranking won't be affected. For example, if John's score is 51 and is ranked as 21st; the rank remains the same EVEN if we have all the scores in the RangeForScore. Isn't it?

I feel silly, you are absolutely right. The lower scores would simply be ranked higher while the passing grades would be ranked properly. Perfect solution :cool:
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,860
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top