Issue trying to identify earliest date & time

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,422
Office Version
  1. 2016
Platform
  1. Windows
I'm trying to identify the earliest date & time with a single criteria and what's returned is incorrect.

The formula I'm using is this:

Excel Formula:
=MIN(IF($A$2:$A5053=D2,$B$2:$B5053))

It's producing "00/01/1900 00:00"

The relevant cells are formatted as custom 'dd/mm/yyyy hh:mm' but no matter how I format the cells, the result is always incorrect.

I've attached a sample of the workbook, if anyone can help me understand how to resolve this please?

MrExcel.xlsx
ABCD
1Index NumberIndex TimeIndex NumberEarliest Index Time
2IND230000926020/04/2023 09:19IND230000926000/01/1900 00:00
3IND230000926011/04/2024 12:27IND2300011569
4IND230001156916/05/2023 14:50IND2300013377
5IND230001156910/04/2024 00:27IND2300016533
6IND230001156910/04/2024 00:29IND2300017703
7IND230001337706/06/2023 01:09IND2300025545
8IND230001337729/04/2024 13:09IND2400000003
9IND230001653311/07/2023 02:10IND2400001139
10IND230001653311/07/2023 20:30IND2400001938
11IND230001653310/01/2024 15:37IND2400002279
12IND230001653310/04/2024 16:17IND2400002425
13IND230001653310/04/2024 23:51IND2400002503
14IND230001770323/07/2023 16:47IND2400007799
15IND230001770323/07/2023 17:19IND2400008564
16IND230001770323/07/2023 23:29IND2400010159
17IND230001770309/04/2024 16:12IND2400010908
18IND230001770310/04/2024 00:21IND2400011060
19IND230002554520/10/2023 03:02IND2400011062
20IND230002554520/10/2023 03:24IND2400011063
21IND230002554520/10/2023 14:22IND2400011069
22IND230002554514/04/2024 11:49IND2400011081
23IND240000000301/01/2024 01:20IND2400011082
24IND240000000301/01/2024 04:54IND2400011084
25IND240000000301/04/2024 12:00IND2400011085
26IND240000113913/01/2024 00:49IND2400011087
27IND240000113912/04/2024 18:17IND2400011094
28IND240000193822/01/2024 12:13IND2400011096
29IND240000193819/04/2024 19:57IND2400011097
30IND240000227925/01/2024 21:25IND2400011100
31IND240000227908/04/2024 16:34IND2400011101
32IND240000242527/01/2024 18:29IND2400011102
33IND240000242524/04/2024 13:46IND2400011104
34IND240000250328/01/2024 13:08IND2400011105
35IND240000250328/01/2024 17:00IND2400011106
36IND240000250302/04/2024 16:50IND2400011107
37IND240000779914/03/2024 19:55IND2400011108
38IND240000779903/04/2024 10:51IND2400011111
39IND240000856408/04/2024 12:01IND2400011112
40IND240001015927/03/2024 11:47IND2400011117
41IND240001015927/03/2024 12:39IND2400011119
42IND240001015905/04/2024 11:58IND2400011122
43IND240001090831/03/2024 05:40IND2400011124
MREXCEL
Cell Formulas
RangeFormula
D2D2=MIN(IF($A$2:$A5053=C2,$B$2:$B5053))
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You can use AGGREGATE function.

=AGGREGATE(15,6,$B$2:$B5053/($A$2:$A5053=C2)/($B$2:$B5053<>""),1)

Then warp up with IFERROR to avoid error.
 
Upvote 0
Solution
You can use AGGREGATE function.

=AGGREGATE(15,6,$B$2:$B5053/($A$2:$A5053=C2)/($B$2:$B5053<>""),1)

Then warp up with IFERROR to avoid error.
Thanks - but that's producing 20/04/2023 09:19 which isn't the correct result
 
Upvote 0
That's the correct result with the data you posted.
 
Upvote 0
Of course, doh!

I forgot the change of year!

I'll check the other results and report back.....
 
Upvote 0
The aggregate solution works guys - thanks to you all for taking the time to reply :-)
 
Upvote 0

Forum statistics

Threads
1,223,939
Messages
6,175,533
Members
452,652
Latest member
eduedu

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