RANK by two columns to exclude rows with a specific cell value in a third column

janetk411

New Member
Joined
Feb 7, 2019
Messages
15
[TABLE="width: 300"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]
[TD="align: right"]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]BRANCH

[/TD]
[TD]CLIENT
[/TD]
[TD]FILECNT
[/TD]
[TD]RANK
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12
[/TD]
[TD]ABRE01
[/TD]
[TD]50
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]12
[/TD]
[TD]AEVA01
[/TD]
[TD]45
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]12
[/TD]
[TD]NIEX01
[/TD]
[TD]46
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]12
[/TD]
[TD]NIEX02
[/TD]
[TD]47
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]12
[/TD]
[TD]CAI00
[/TD]
[TD]29
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]32
[/TD]
[TD]ABRE02
[/TD]
[TD]15
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]32
[/TD]
[TD]AEVA01
[/TD]
[TD]45
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]32
[/TD]
[TD]NIEX05
[/TD]
[TD]9
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]32
[/TD]
[TD]NIEX07
[/TD]
[TD]47
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]32
[/TD]
[TD]CAVI00
[/TD]
[TD]40
[/TD]
[TD]2
[/TD]
[/TR]
</tbody>[/TABLE]

The table above represents the number of files, by client, by branch. I want to rank the FILE COUNT number in descending order, by BRANCH but I do not want to include the client codes that begin with the first four letters NIEX in the ranking.
The RANK column represents the ranking that the formula should create.
Can someone help me with a formula to auto create the ranking in the RANK column?
I appreciate any assistance some one can give me.
Thank you in advance.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Since Excel doesn't have a RankIf function, you could use a Countifs function.

Excel 2010
ABCD
BRANCHCLIENTFILECNTRANK
ABRE01
AEVA01
NIEX01
NIEX02
CAI00
ABRE02
AEVA01
NIEX05
NIEX07
CAVI00

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]50[/TD]
[TD="align: right"]1[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]2[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]46[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]47[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]29[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]15[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]1[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]9[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]47[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]40[/TD]
[TD="align: right"]2[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D2[/TH]
[TD="align: left"]=IF(LEFT(B2,4)="NIEX","",COUNTIFS(A:A,A2,C:C,">"&C2,B:B,"<>NIEX*")+1)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Yeah! Thank you. That did it but..... this allows for duplicate ranking. Do you know how to change this so each rank is unique?
 
Upvote 0
Excel 2010
ABCDE
BRANCHCLIENTFILECNTTIEBREAKERRANK
ABRE01
AEVA01
NIEX01
NIEX02
CAI00
ABRE02
AEVA01
NIEX05
NIEX07
CAVI00
CAI00

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]50[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]1[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]2[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]46[/TD]
[TD="align: right"]46[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]47[/TD]
[TD="align: right"]47[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]12[/TD]

[TD="align: right"]29[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]15[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]4[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]45[/TD]
[TD="align: right"]1[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]9[/TD]
[TD="align: right"]9[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]47[/TD]
[TD="align: right"]47[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]32[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]40[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]32[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]40[/TD]
[TD="align: right"]40.1[/TD]
[TD="align: right"]2[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D2[/TH]
[TD="align: left"]=C2+(COUNTIFS(A$2:A2,A2,C$2:C2,C2)-1)*0.1[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E2[/TH]
[TD="align: left"]=IF(LEFT(B2,4)="NIEX","",COUNTIFS(A:A,A2,D:D,">"&D2,B:B,"<>NIEX*")+1)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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