VBA? dates rank? possible?

rsj88

New Member
Joined
Feb 20, 2018
Messages
38
Need a Vba code to obtain the rank for the latest date and car type.

EG find the latest date from today() for each car then obtain a rank. if the car changes the rank starts from 1 again. so In theory the latest 25 dates for each car.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Car[/TD]
[TD]Date[/TD]
[TD]Rank[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Volvo[/TD]
[TD]01/01/2018[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]volvo[/TD]
[TD]04/02/2018[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]audi[/TD]
[TD]04/03/2018[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]bmw[/TD]
[TD]20/02/2018[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
so In theory the latest 25 dates for each car.

Hi, not sure what that means - but maybe you could try this.


Excel 2013/2016
ABC
1CarDateRank
2Volvo01/01/20182
3volvo04/02/20181
4audi04/03/20181
5bmw20/02/20181
Sheet1
Cell Formulas
RangeFormula
C2=1+COUNTIFS($A$2:$A$5,A2,$B$2:$B$5,">"&B2)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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