Return the nth largest date

Graemea

Board Regular
Joined
Oct 30, 2015
Messages
119
Office Version
  1. 365
Platform
  1. Windows
Hi,


I have raw data arranged as follows:


Column A: Product Codes
Column B: Month End Dates


There are dozens of different product codes in column A and each is associated with up to 10 month-end dates.


Can someone please suggest a formula that will put in cell C1 the earliest date in column B associated with a particular product code, in cell C2 the second earliest date, in cell C3 the third earliest date etc?


Thanks!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
can you work on this?


Book1
ABCDE
1Product CodesMonth End DatesProduct CodesMonth End Dates
2P107/06/2019P201/05/2019
3P110/07/201914/05/2019
4P103/04/201922/05/2019
5P127/03/201925/05/2019
6P114/04/201928/05/2019
7P114/06/201931/05/2019
8P120/05/201913/06/2019
9P128/05/2019
10P101/07/2019
11P231/05/2019
12P228/05/2019
13P201/05/2019
14P225/05/2019
15P213/06/2019
16P205/07/2019
17P222/05/2019
18P214/05/2019
19P221/06/2019
Sheet4
Cell Formulas
RangeFormula
E2{=SMALL(IF($A$2:$A$19=$D$2,$B$2:$B$19),ROW(D2)-ROW($D$1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
How about


Excel 2013/2016
ABC
1abc131/01/201931/01/2019
2abc228/02/201928/06/2019
3abc328/03/201928/11/2019
4abc428/04/2019
5abc528/05/2019
6abc128/06/2019
7abc228/07/2019
8abc328/08/2019
9abc428/09/2019
10abc528/10/2019
11abc128/11/2019
12abc228/12/2019
13abc328/01/2020
14abc428/02/2020
15abc528/03/2020
All
Cell Formulas
RangeFormula
C1{=IFERROR(SMALL(IF($A$1:$A$15="abc1",$B$1:$B$15),ROWS($1:1)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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