Find The Earliest Date In Two Specific Years

Dtex20

Board Regular
Joined
Jan 29, 2018
Messages
50
Hi Guys,

Lets say you have 20 Dates, 10 for each year: 2018, 2019. You also have two ID's.

I'm trying to find the earliest date in 2018 and the earliest date in 2019, in which each ID appear.

MIN, MAX wont work, as the dates can be in the future or in the past. The data also isn't sorted and the large data set will take too long to do manually. I'm looking for a formula.

ID 101/01/2017
ID 201/01/2017
ID 101/05/2018
ID 201/03/2018
ID 101/01/2018
ID 201/07/2018
ID 101/05/2019
ID 201/08/2019

<tbody>
</tbody>

ID 1 - 01/01/2018 - 01/05/2019
ID 2 - 01/03/2018 - 01/08/2019

Above would be the correct answer, for the table example.

Thanks,
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
How about


Book1
ABC
1ID 101/01/2017
2ID 201/01/2017
3ID 101/05/2018
4ID 201/03/2018
5ID 101/01/2018
6ID 201/07/2018
7ID 101/05/2019
8ID 201/08/2019
9
1020182019
11ID 101/01/201801/05/2019
12ID 201/03/201801/08/2019
Log
Cell Formulas
RangeFormula
B11{=MIN(IF(($A$1:$A$8=$A11)*(YEAR($B$1:$B$8)=B$10),$B$1:$B$8))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
How about

ABC
1ID 101/01/2017
2ID 201/01/2017
3ID 101/05/2018
4ID 201/03/2018
5ID 101/01/2018
6ID 201/07/2018
7ID 101/05/2019
8ID 201/08/2019
9
1020182019
11ID 101/01/201801/05/2019
12ID 201/03/201801/08/2019

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Log

Array Formulas
CellFormula
B11{=MIN(IF(($A$1:$A$8=$A11)*(YEAR($B$1:$B$8)=B$10),$B$1:$B$8))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>


Hi,

That is perfect mate! Thank you very much
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

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