filter values with earliest record (in a list with duplicates)

jioben

New Member
Joined
Jun 5, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
1654475225423.png


hello everyone,

i am working on a dataset that is about 500k of entries with duplicates.

the ideal output i need is to get the unique names in the list but should be with the oldest/earliest date recorded and consider the two given dates.

what would be the best way so i can come up with the data i need considering the two scenario above?

suggestions other than using filter will also be appreciated.

TIA 🙂
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
See if this works for you:
MrExcel_20220603.xlsx
ABCDEFGH
1CodeNameRelDateIntDateCodeNameDate
21Leroy3/12/20203/12/20201Leroy8/14/2019
31Leroy8/14/201911/27/20202Daisy3/6/2020
41Leroy3/12/202011/27/20203Bob7/15/2019
51Leroy10/29/202111/27/20204Maggie1/14/2019
61Leroy3/12/202010/29/2020
72Daisy10/22/20203/6/2020
82Daisy9/24/20213/6/2020
92Daisy3/12/20203/6/2020
102Daisy9/24/20213/6/2020
112Daisy3/12/20203/12/2020
123Bob7/15/20198/16/2019
134Maggie1/17/20191/20/2019
144Maggie1/15/20191/14/2019
Sheet10
Cell Formulas
RangeFormula
F2:G5F2=UNIQUE($A$2:$B$14)
H2:H5H2=LET(fndt,FILTER($C$2:$D$14,$B$2:$B$14=INDEX($F$2#,ROWS(F$2:F2),2)),MIN(FILTER(fndt,INDEX(fndt,,1)=MIN(INDEX(fndt,,1)))))
Dynamic array formulas.
 
Upvote 0
I'm happy to help. I hope I understood the objective...for any given unique name, find the minimum Released Date to identify the row of interest, and then on that same row, choose the minimum of either the Release Date or the Interview Infodate?
 
Upvote 0
hello sir,

a follow up question on the data given above;

a. how about if i want to extract that unique value from the given dataset but should consider also the earliest date?

b. remove the duplicate names and retain the unique names with the earliest date?
 
Upvote 0
The solution I offered in Post #2 returns unique combinations of Codes and Names that are present in the source data, and if there are duplicates, it uses the row where the Released Date is earliest. Then it compares the Released Date to the Interview Date on that same row and chooses the earliest. Is that what you mean by “extract that unique value from the given dataset”? As for removing duplicate names and retaining only the unique ones with the earliest dates, there is no way to do that with a formula if your objective is to modify the original source data. However, you could do that using VBA or Power Query. Alternatively, you could use the formulas to produce the trimmed down table of unique codes/names/early dates and then copy those results and Paste Special > Values somewhere to preserve the results independent of the linkage to the original source table.
 
Upvote 0

Forum statistics

Threads
1,216,081
Messages
6,128,696
Members
449,464
Latest member
againofsoul

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