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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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