Oldest Date

Johnboy28

Board Regular
Joined
Jun 22, 2013
Messages
198
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2010
Platform
  1. Windows
Hi, I need a formula that can tell me the oldest date based on the Code? Thank you
CodeProduction DateOldest Date
241111/12/2024
2411111/11/2023
242452/02/2024
2411110/01/2024
242455/02/2024
211112/05/2024
600111/02/2024
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I'm not certain about what is meant by "oldest" date. This returns the earliest date. If you want the latest date, change SMALL to LARGE.
MrExcel_20240107.xlsx
ABC
1CodeProduction DateOldest Date
2241111/12/202411/11/2023
32411111/11/202311/11/2023
4242452/2/20242/2/2024
52411110/1/202411/11/2023
6242455/2/20242/2/2024
7211112/5/20242/5/2024
8600111/2/20241/2/2024
Sheet2
Cell Formulas
RangeFormula
C2:C8C2=SMALL(FILTER($B$2:$B$8,$A$2:$A$8=A2),1)
 
Upvote 0
Another option

Excel Formula:
=SORTBY(A2:B8,A2:A8,1)
 
Upvote 0
Thanks again. I used =SMALL(FILTER($B$2:$B$8,$A$2:$A$8=A2),1)
 
Upvote 0
You're welcome...glad to help.

@SunnyAlv, a quick side note...Your formula sorts by Code # but does not return the earliest date for each Code #...rather, it returns the original date associated with that particular item. There is some convenience in having a spilling formula: one idea is shown below in D2.
MrExcel_20240107.xlsx
ABCD
1CodeProduction DateOldest DateEarliest Date (spilling)
2241111/12/202411/11/202311/11/2023
32411111/11/202311/11/202311/11/2023
4242452/2/20242/2/20242/2/2024
52411110/1/202411/11/202311/11/2023
6242455/2/20242/2/20242/2/2024
7211112/5/20242/5/20242/5/2024
8600111/2/20241/2/20241/2/2024
Sheet2
Cell Formulas
RangeFormula
D2:D8D2=BYROW($A$2:$A$8,LAMBDA(r,SMALL(FILTER($B$2:$B$8,$A$2:$A$8=r),1)))
C2:C8C2=SMALL(FILTER($B$2:$B$8,$A$2:$A$8=A2),1)
Dynamic array formulas.
 
Upvote 0
You could also use MINIFS:

Excel Formula:
=MINIFS($B$2:$B$8,$A$2:$A$8,A2)
 
Upvote 0
There are always so many ways to do anything in Excel! :)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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