Rank Question - Ranking by criteria excluding 0

mat166801

New Member
Joined
May 1, 2015
Messages
3
Hi,

I have been using the following formula to rank successfully =SUMPRODUCT(($A$2:$A$26=$A2)*($C2>$C$2:$C$26))+1 however I would like to only rank numbers above 0.

I have provided a small sample of what result I have been getting with the above formula and in column C, Column D shows the rank result I would like to achieve.

Any help would be greatly appreciated.

Thanks

ABCD
Group SalesCurrent RankDesired Rank
101 $ 30.0032
101 $ 20.0021
101 $ -10
101 $ 50.0043
202 $ 10.0021
202 $ 10.0022
202 $ -10
202 $ 30.0043
202 $ 40.0054
202 $ 50.0065
404 $ 10.0021
404 $ 20.0032
404 $ 30.0043
404 $ 40.0054
404 FALSE60
404 $ -10

<tbody>
</tbody>
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Can't you just subtract 1 from the results?

UPDATE: Scratch that, I 've just seen your results and you cant do that.
 
Upvote 0
Desired Rank column, Cell D2 enter formula and copy down :

=IF(N(B2),COUNTIFS(A$2:A$17,A2,B$2:B$17,"<"&B2)+COUNTIFS(A$2:A2,A2,B$2:B2,B2),0)

Regards
 
Last edited:
Upvote 0
Try this entered as array (CSE)

=SUMPRODUCT(IF($B$2:$B$26>=1,($A$2:$A$26=$A2)*($B2>$B$2:$B$26)))
 
Upvote 0
Thanks but still not working. What if I get rid of the duplicates and text and just want to exclude 0?

Also this is just a small sample it will be applied to approx 5000 lines and 120 different groups.

Group SalesCurrent RankDesired Rank
101 $ -10
101 $ 20.0021
101 $ 30.0032
101 $ 40.0043
202 $ 10.0011
202 $ 20.0022
202 $ 30.0033
202 $ 40.0044

<tbody>
</tbody>
 
Upvote 0
You're welcome, it appears to work on your original data ok, except where there is a duplicate value, it then returns the same rank for both.
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,841
Members
449,193
Latest member
MikeVol

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