Rank Multiple Criteria Duplicates

Lewzerrrr

Active Member
Joined
Jan 18, 2017
Messages
256
Hi,

I have a table of data that looks like below.

I need to be able to rank seperately both the TS & TM division sales whilst only looking at certain criteria, in this case 66 and 67 but these numbers just a small sample.

My actual worksheet is a dump with over 30 different Area's.


DivisionAreaSalesRank 66 & 67.
TS66502
TS66503
TS6715
TS6890
TM66801
TS67504
TM66602
TM6870
TM67603
TS661001

<colgroup><col width="64" span="5" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Maybe:

ABCDEF
1DivisionAreaSalesRank 66 & 67.
2TS665022
3TS665023
4TS67155
5TS6890
6TM668011
7TS675024
8TM666022
9TM6870
10TM676023
11TS6610011

<tbody>
</tbody>
Sheet13

Worksheet Formulas
CellFormula
E2=IF(AND(B2<>66,B2<>67),"",SUM(COUNTIFS($A$2:$A$11,A2,$B$2:$B$11,{66,67},$C$2:$C$11,">"&$C$2:$C$11))+1)

<tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
F2{=IF(AND(B2<>66,B2<>67),"",SUM(IF($A$2:$A$11=A2,IF(ISNUMBER(MATCH($B$2:$B$11,{66,67},0)),IF(C2-ROW()/1000<$C$2:$C$11-ROW($C$2:$C$11)/1000,1))))+1)}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



The E2 formula gives the same ranking to Sales with the same amount. If you want to break the ties, the F2 array formula will use the row number as a tie-breaker, and matches your desired output. (Small formatting issue on line 10.)
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

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