Rank With Multiple Crieteria

xlmaniac

Well-known Member
Joined
Jul 2, 2009
Messages
531
Office Version
  1. 2010
Platform
  1. Windows
Dear All,
I have a data set spread across thousands of row.
Below is the sample for the same.
I would like to calculate rank based on the Region & Category.
The sample data set is spread across A1:D7.
[TABLE="width: 256"]
<tbody>[TR]
[TD="class: xl63, width: 64"]Region[/TD]
[TD="class: xl63, width: 64"]Category[/TD]
[TD="class: xl63, width: 64"]Sale[/TD]
[TD="class: xl63, width: 64"]Rank[/TD]
[/TR]
[TR]
[TD="class: xl63"]A[/TD]
[TD="class: xl63"]Z[/TD]
[TD="class: xl63"]100[/TD]
[TD="class: xl63"]3[/TD]
[/TR]
[TR]
[TD="class: xl63"]A[/TD]
[TD="class: xl63"]Z[/TD]
[TD="class: xl63"]140[/TD]
[TD="class: xl63"]1[/TD]
[/TR]
[TR]
[TD="class: xl63"]A[/TD]
[TD="class: xl63"]Z[/TD]
[TD="class: xl63"]105[/TD]
[TD="class: xl63"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]B[/TD]
[TD="class: xl63"]C[/TD]
[TD="class: xl63"]170[/TD]
[TD="class: xl63"]3[/TD]
[/TR]
[TR]
[TD="class: xl63"]B[/TD]
[TD="class: xl63"]C[/TD]
[TD="class: xl63"]215[/TD]
[TD="class: xl63"]2[/TD]
[/TR]
[TR]
[TD="class: xl63"]B[/TD]
[TD="class: xl63"]C[/TD]
[TD="class: xl63"]220[/TD]
[TD="class: xl63"]1


Could Somebody help me with the formulae across D2:D7 which can yield the desired result?
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try...

D2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=MATCH(C2,LARGE(IF($A$2:$A$7=A2,IF($B$2:$B$7=B2,$C$2:$C$7)),ROW(INDIRECT("1:"&COUNTIFS($A$2:$A$7,A2,$B$2:$B$7,B2)))),0)

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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