rank - exclude zero

calebfda

New Member
Joined
Apr 28, 2009
Messages
16
I am trying to figure out how to use the rank function on a column of
data. The trick is that i dont want it to include or rank zero's. To
achieve a ranking the number should be a positive number. Here is what
i have so far.
For instance if i had a column that was
32
0
14
55

14 would have a rank of 1, etc.


I dont care if it duplicates a ranking as long as the numbers are
EXACTLY the same. like two items can be ranked 5 if they are both
$6.06

=RANK(I5,$I5:$I40,1)&" of "&COUNTIF($I$5:$I$40, ">0")
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Assuming that A2:A5 contains the data, try...

B2, copied down:

=IF(A2>0,RANK(A2,$A$2:$A$5,1)-COUNTIF($A$2:$A$5,"<=0"),"")
 
Upvote 0
wow...this board is quick!! love it.

i tried using a 0 instead of 1 to change the order....and started getting negative rankings. do i need to change the countif statement?
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,034
Members
448,543
Latest member
MartinLarkin

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