Ranking Dates by two criteria

sriche01

Board Regular
Joined
Dec 24, 2013
Messages
136
Office Version
  1. 365
Platform
  1. Windows
Hello All,

So I am trying to rank orders for items in our orders spreadsheet based on when the order was placed:

Date to ShipItem NumberOrder PlacedRank
3/4/2019ABEL MAG187/21/20181
5/13/2019ABEL MAG1812/14/20182
6/3/2019AMEL COS1011/22/20171
3/25/2019ARON VIK1811/19/20182
6/3/2019ARON VIK1811/22/20171
5/18/2020CHAM PAG183/1/20181
6/3/2019CHAM PAG188/29/20171
5/20/2019CHAM PAG186/8/20182

<tbody>
</tbody>
Above is a sample of the relevant data. Numbers in red are what I am trying to achieve with the lower number meaning the date is older and the order line is higher priority.


The devil is in the details of selecting the data set to rank for each line. I have tried

{=RANK.EQ(C2,IF($B$2:$B$9=B2,IF(YEAR($A$2:$A$9)=YEAR(A2),$C$2:$C$9)),1)}

It evaluates appropriately until the final step, then gives me a #VALUE error.

Any Ideas?

Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Does this do it?

=COUNTIFS(B:B,B2,C:C,"<"&C2)+1

Im not sure why your last 3 rankings are 1, 1, 2?
 
Upvote 0
Thank you! I had seen other solutions with countifs, but couldn't quite wrap my mind around it. Now I do. As for the discrepancy you mentioned, I wasn't very clear. I had two criteria.
1) the date the order was placed
2) the year it was to ship
I want to rank the orders for 2019 separately from 2020. Sorry I didn't explain that! But I just added some conditions on the countifs to accommodate that and voila!

Thanks Again!
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,856
Members
449,194
Latest member
HellScout

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