Ranking on two integer columns

Kmitchell

Active Member
Joined
Feb 27, 2007
Messages
368
Office Version
  1. 365
Platform
  1. Windows
Hi, I am struggling to locate a formula that would solution my expected outcome. Essentially I am looking to rank two columns both based on integers.

Column B represents the utilizers, I want this to be the first factor for the rank. Column E reflects the rate change. I want this to be the second factor for the rank.

The goal is to identify the top utilized drugs that also experienced an increase and a decrease in the rate change. If we simply look at the rate change only the rank of drug564 it's the steepest rate change of $2.07 but there are only 44 utilizers. I would like the #1 rank to be on Drug 11 that had 1,494 utilizers and a rate change of $0.01 because this drug is the most utilized with a rate increase despite it being a $0.01 change.

Perhaps there is a work around, helper columns?

Open to any and all suggestions.
 

Attachments

  • Capture.PNG
    Capture.PNG
    30.1 KB · Views: 9

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Adapt the range, try:
Excel Formula:
=SORTBY(A:E,B:B,-1,E:E,-1)
 
Upvote 0
You need to leave enough cells for the formula to spill out. Clear out things below and to the right or pick somewhere you have a lot of space.
 
Upvote 0
You need to leave enough cells for the formula to spill out. Clear out things below and to the right or pick somewhere you have a lot of space.
Thanks, its not working for me for some reason, takes some time to process then it #Spill!, maybe not enough resources on the machine
 
Upvote 0
Read here on #SPILL!

Try it on a small range first and see if that it works. That'll rule out the memory cause.
Also, did you edit the range to actual data e.g. A2:A2000 not A:A. Don't use the entire column.
 
Upvote 0
Another option if you just want a rank is
Excel Formula:
=LET(f,FILTER(A2:E3000,A2:A3000<>""),XMATCH(TAKE(f,,1),TAKE(SORT(f,{2,5},-1),,1)))
 
Upvote 0

Forum statistics

Threads
1,226,067
Messages
6,188,700
Members
453,493
Latest member
BRACE

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