Dynamic Rank Formula: No Duplicates or Errors

ReturnAg08

New Member
Joined
Nov 2, 2016
Messages
7
I've seen a number of threads that help with creating rank formulas that solve the duplicates problem by using COUNTIF statements, and others that allow for removal of blanks or #DIV/0! errors, but I'm using a set of data where cells are updating dynamically, and some of them might be numbers at some point, and other times it will show the #N/A error.

Current Formula: RANK(X143,$X$143:$BE$143,1)+COUNTIF($X$143:X143,X143)-1

Columns X through BE have the numbered values, though depending on how the page is updated the columns towards the end might be turned into the #N/A error. I've tried some IFERROR or IF(ISNA()) type things, but either I'm not on the right track or I'm setting it up incorrectly. The values need to be kept as columns, and I can't use VBA here.

Link 1 Source (no blanks): excel - Truly unique ranking (while ignoring empty cells) - Stack Overflow
Link 2 Source (#DIV/0 error): http://www.mrexcel.com/forum/excel-questions/144896-rank-how-exclude-errors.html
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi.

Suggestion:

AB
1ValueRank
22002
31203
410001
5Text0
6504
70
810001

<tbody>
</tbody>


Array-Formula (Press CTRL-SHIFT-Enter) B2:
{=ISNUMBER(A2)*SUM(IF(IF(ISNUMBER(A$2:A$100)*(COUNTIF(INDIRECT("A1:A"&ROW($A$2:$A$100)),A$2:A$100)=1),A$2:A$100,MIN(A$2:A$100)-1)>A2,1),1)}
 
Upvote 0
Matt,

If I've modified your formula correctly, then it looks like what I've copied below. That works for ranking the first cell, but it's not working when I copy it across to the other cells:

=ISNUMBER(X143)*SUM(IF(IF(ISNUMBER($X$143:$BE$143)*(COUNTIF(INDIRECT("X143:BE"&COLUMN($X$143:$BE$143)),$X143:BE$143)=1),$Y$143:$BE$143,MIN($Y$143:$BE$143)-1)>Y143,1),1)
 
Upvote 0
Matt,

If I've modified your formula correctly, then it looks like what I've copied below. That works for ranking the first cell, but it's not working when I copy it across to the other cells:

=ISNUMBER(X143)*SUM(IF(IF(ISNUMBER($X$143:$BE$143)*(COUNTIF(INDIRECT("X143:BE"&COLUMN($X$143:$BE$143)),$X143:BE$143)=1),$Y$143:$BE$143,MIN($Y$143:$BE$143)-1)>Y143,1),1)

Meant to also say that, yes, I did enter it as an array so it has the curly brackets.
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

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