Rank function

bexll

New Member
Joined
Oct 6, 2017
Messages
2
Hi,

I'm using the RANK function with COUNTIF to uniquely rank all values within a range (=RANK(A2,$A$2:$A$11,0)+COUNTIF($A$2:A2,A2)-1).

The removing duplicates is working great for most of my values, but I've currently got two values of exactly 7.5% (I've checked using a =A1=A2 style test) which are returning different ranks in the standalone RANK function, which is then messing things up when it's combined with the countif function - the second 7.5% value is ranked differently from the first by the RANK function, but is then recognised as a duplicate value by the COUNTIF function which then dutifully adds one to the rank, which means that it now has the same rank as the next smallest value).

Does anyone have any clue why this might be happening?

Thanks in advance!

Rebecca
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hello Rebecca, welcome to MrExcel

To be honest, I'm not sure why that's happening........but it's possible to use COUNTIF instead of RANK, so would this work better with 2 COUNTIF functions, i.e.

=COUNTIF(A$2:A$11,">"&A2)+COUNTIF($A$2:A2,A2)
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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