Find first occurrence for each day

davidphi

New Member
Joined
Jan 16, 2017
Messages
5
Hi,

I have a list of date / time fields where I want to find the earliest occurrence for a particular day. Some example data is:

29/01/2020 09:07
29/01/2020 09:59
29/01/2020 15:09
30/01/2020 09:08
30/01/2020 10:12
30/01/2020 12:58
30/01/2020 14:16
30/01/2020 16:15
31/01/2020 09:01
31/01/2020 10:53

So - from this list I'd like a formula to return true for 29/01/2020 09:07, 30/01/2020 09:08 and 31/01/2020 09:01, but false for everything else.

My ultimate aim, once I've got this, is that I'd ideally also like to introduce another column of data with different items - similar to

29/01/2020 09:07 Duck
29/01/2020 09:59 Sheep
29/01/2020 15:09 Sheep
30/01/2020 09:08 Cow
30/01/2020 10:12 Goat
30/01/2020 12:58 Duck
30/01/2020 14:16 Duck
30/01/2020 16:15 Goat

I'd then like the formula to return true for earliest time each of the animals had a date/time logged on a given day eg:

Duck - 29/01/2020 09:07 and 30/01/2020 12:58
Sheep - 29/01/2020 09:59
Cow - 30/01/2020 09:08
Goat - 30/01/2020 10:12

I've tried this using an index / match formula, but I can't work it out!

Thanks,
David
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
is that what you want?

mintime.png
 
Upvote 0
sure, here is M-code for Power Query
(this is NOT vba !)
Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Type = Table.TransformColumnTypes(Source,{{"date", type date}, {"time", type time}, {"item", type text}}),
    Group = Table.Group(Type, {"date", "item"}, {{"time", each List.Min([time]), type time}})
in
    Group

btw. Update profile (Account details) about Excel version - less troubles & wasted posts
 
Upvote 0

Forum statistics

Threads
1,214,999
Messages
6,122,645
Members
449,093
Latest member
Ahmad123098

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