RANK based on multiple criteria

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,632
Office Version
  1. 365
Platform
  1. Windows
I have a list of data that consists of 3 columns

Col A consists of values T1-T4
Col B consists of a region name (North American, Europe, etc)
Col c consists of a numeric value

I need to create a formula that will rank the above based on their value within their region with all T1 values being ranked first, then T2, etc.

So a T1 for North America with a value of 100 (being the highest value in the list for North America for all T1's) would be 1 and a T4 for North America for 100 rank would be the next number after all the T1-T3's had been ranked.


TIA
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hello Mikeymay,

Assuming data is in rows 2 to 100 (adjust as required) you can use this formula for ranking in D2 copied down:

=SUMPRODUCT(((5-RIGHT(A$2:A$100))*1000+C$2:C$100>(5-RIGHT(A2))*1000+C2)*(B$2:B$100=B2))+1

The 2 * 1000 values in the formula are a little arbitrary - this works assuming column C values won't exceed 999 - if they might exceed 999 then you need to change those 1000 values appropriately
 
Upvote 0
Barry

Many thanks for this.......

I did manage to work out how to do this by using multiple countifs but this is a much simpler way of achieving what I need :o)
 
Upvote 0
Barry

I have spent a bit of time trying to work out what this is doing and being honest, I'm struggling......

I need to add a further column into it which would be a company name.

Basically, it could be that there are 2 rows of data with the same T value, Region, and value but would need to be ranked differently due to a different company name.

Is this possible with the formula you provided?

TIA
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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