Ranking Numbers With Criteria

austinandreikurt

Board Regular
Joined
Aug 25, 2020
Messages
91
Office Version
  1. 2016
Platform
  1. Windows
I have the set of numbers from A1 to A34:

2011330310120010231222214320513423
What I would like is to rank these numbers including the duplicates. But, for duplicate ones, I am using the numbers in Row 3 which is C3 to C34 to determine the rank of duplicates:

50356701010450050794665521398014481748

I used this formula "=RANK(A1,$A$1:$AH$1,0)+COUNTIF($A$1:A1,A1)-1" but this one will not consider the criteria set on Row 3
 
A little shorter:

=SUMPRODUCT((A1<$A$1:$A$34)+(A1=$A$1:$A$34)*(C1>$C$1:$C$34))+SUMPRODUCT((A1=$A$1:$A1)*(C1=$C$1:$C1))
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
yes they will have to be ranked as the formula says because is should recognized the 1st instance of the same criteria as the higher rank
Thanks for the clarification.


A little shorter:
.. and again

20 09 04.xlsm
ABCDE
12512
20028
31322
41526
5364
6375
70029
831010
91120
100030
111423
122513
130031
140032
151527
160033
172718
18398
191424
202616
212617
222514
232515
241221
254132
26399
272819
280034
295141
301425
31386
324173
332411
34387
Rank
Cell Formulas
RangeFormula
E1:E34E1=RANK(A1,A$1:A$34)+COUNTIFS(A$1:A$34,A1,C$1:C$34,"<"&C1)+COUNTIFS(A$1:A1,A1,C$1:C1,C1)-1
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

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