Ranking Issue

easybpw

Active Member
Joined
Sep 30, 2003
Messages
408
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hello,

Thanks in advance for your help. I'm currently using this formula to rank a range of cells.

=IFERROR((RANK(AR3,$AR$3:$AR$1000)+COUNTIF(AR$3:$AR3,AR3)-1),"")

I had thought it was working like it should except I now see that when the data I'm ranking contains the same data it is ranking them the same. For example if in column AR the result is 16.7 and that's in multiple cells then the rank is the same. I need it to be the next number in the rank. So if 16.7 is ranked #100 then the first of these results would be #100 and the next would be #101 etc.

For some reason it looks like the formula is working like I want until I get further down the worksheet. I understand my example is going to be hard to understand and follow but it's the best I can explain. Is there a better formula that would return the results I need?

Thanks!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

maras

New Member
Joined
Dec 12, 2019
Messages
35
Office Version
  1. 2010
Platform
  1. Windows
Another method.
VBA Code:
=IFERROR(MATCH(LARGE($AR$3:$AR$1000-ROW($AR$3:$AR$1000)/10^5,ROW(1:1)),$AR$3:$AR$1000-ROW($AR$3:$AR$1000)/10^5,0),"")
 

alz

Board Regular
Joined
Jul 17, 2020
Messages
130
Office Version
  1. 2019
Platform
  1. Windows
How about wraping it again in countif? Not test yet!

=IFERROR(Countif((RANK(AR3,$AR$3:$AR$1000)+COUNTIF(AR$3:$AR3,AR3)-1),">1")+RANK(AR3,$AR$3:$AR$1000)+COUNTIF(AR$3:$AR3,AR3)-1),"")
 

JGordon11

Board Regular
Joined
Jan 18, 2021
Messages
66
Office Version
  1. 2019
Platform
  1. Windows
Your formula looks like it should work and it works for me on test data. Check to see if the two 16.7s are actually equal.

So if AR100 looks like 16.7 and AR220 looks like 16.7 but they are ranked the same then enter "=AR100=AR220" without the quotes in an empty cell. It will return true if excel thinks they contain same value and false otherwise. If it returns FALSE then you may need to clean up your data using ROUND() or other methods.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,404
Messages
5,636,095
Members
416,898
Latest member
imsorrymen

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
Top