Create a rank based on three fields in Excel

janetk411

New Member
Joined
Feb 7, 2019
Messages
15
YEAR
CLIENT
STATION
STATIONCNT
STATIONCNT RANK
2019
A
CHI
8
1
2019
A
LAX
2
2
2018
A
DAL
7
3
2018
A
SFA
25
1
2018
A
NYO
8
2
2018
B
SFA
1
4
2018
B
CHO
10
1
2018
B
CHI
4
2
2019
B
LAO
2
3
2019
B
LAX
23
1
2019
B
NYA
4
2

<tbody>
</tbody>
I want to rank client file count by year by station.
I normally use SUMPRODUCT if there is only two fields (ie:CLIENT & STATIONCNT) but now have a third column, YEAR, that I need to include the ranking.... Can someone help me with this formula?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
The expected ranking should be as shown in my original post - STATIONCOUNT RANK.

A "station" represents a branch at my company.

My original spreadsheet contains thousands of lines. Each line represents the File Count, by Station, by client, by year

I have to create a report for my boss that shows the file count for each client, by year and top three stations that had the most file count for that client, for that year

So if I can rank the file count, by client by year, by station, I can easily identify the top three branches.

Does that make sense? I appreciate your assistance!
 
Upvote 0
Is this what you want?
=COUNTIFS(A:A,A2,B:B,B2,D:D,">"&D2)+1
 
Upvote 0
The formula you have provided COUNTS the STATIONCNT lines, I need to RANK the STATIONCNT amount based on the year and client code. So in the example in my original post, for client = A, STATIONCNT 25 is ranked as 1 since that is the highest for that client for that year, 8 is ranked as 2 and then 7 as 3. Thank you for your assistance.
 
Upvote 0
Which is exactly what the formula returns. :)
 
Upvote 0
ah hah... I see thank you.

Would you know how to create unique "rank". When the STATIONCNT is duplicated for the same client/year I am receiving duplicate ranks.
 
Upvote 0
How about
=COUNTIFS(A:A,A2,B:B,B2,D:D,">"&D2)+COUNTIFS(A$2:A2,A2,B$2:B2,B2,D$2:D2,D2)
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,619
Messages
6,120,550
Members
448,970
Latest member
kennimack

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