Every first time of the day

mrwul62

Board Regular
Joined
Jan 3, 2016
Messages
61
Office Version
  1. 365
Platform
  1. Windows
Have been puzzling about the below quite a while. Hope someone can help me out on this.

Column A contains days, multiple rows per day
Column B contains hours, multiple rows per day

I'd like to select/filter the 'earliest' hour (first entry) of each day.

How to filter those?
Example below.


-day time
08-12-2016
09:21:06
08-12-201609:20:49
08-12-2016
05:10:06
07-12-201616:47:42
07-12-201616:44:40
07-12-201616:44:25
07-12-201608:15:55
07-12-201608:15:55
07-12-201608:15:55
07-12-201608:15:55
07-12-201605:08:23
06-12-201616:46:59
06-12-201616:41:04
06-12-201616:40:48
06-12-201604:20:05
05-12-201617:14:36

<colgroup><col><col></colgroup><tbody>
</tbody>

-etc-

Thanks.
=
 
I Think you can use this formula.. It going to work

=IFERROR(IF(COUNTIF($A$2:$A$17,$D2),MIN(IF($A$2:$A$17=$D2,$B$2:$B$17)),""),"")

Thanks,
Dinesh Babu.


problem is that ctrl-shift-enter seems not to work.

this is how it looks like after selecting E2 and then ctrl-shift-enter
(after clipboard copying the formula of course..)


I guess that even if the ranges are not exact, then at least -something- gets in there?
Adjusting the ranges isn't the issue.
=

 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Put this in E2:

=IFERROR(IF(COUNTIF($A$2:$A$17,$D2),MIN(IF($A$2:$A$17=$D2,$B$2:$B$17)),""),"")


While your cursor is at the end of the formula press the keys CTRL+SHIFT+ENTER at the same time. If you have done this correctly then the curly brackets are at the beginning and end of the formula.

You must enter a date in column D

 
Last edited by a moderator:
Upvote 0
I feel so dumb, really.
Have tried and tried and tried...


some examples below
when I do ctrl-shift-enter there I get an error.

(you need to click on the thumbnail and then the magnifier within imgur)
=
 
Last edited:
Upvote 0
Got it working... (finally)

figured out that with me all comma's should be replaced with semicolons (different language)

so:

=IFERROR(IF(COUNTIF($A$2:$A$887;$D2);MIN(IF($A$2:$A$887=$D2;$B$2:$B$887));"");"")

Also I had to copy all the unique values of the dates into column D


Anyway, it looks like this now.

Many thanks to you all!!




=
 
Upvote 0
See this example:

Excel Workbook
ABCDE
1DateTime*Enter DateLowest Time For Date From Column D
222-03-201713:09:49*22-03-201712:32:32
322-03-201712:34:51***
422-03-201712:32:32***
Sheet1
 
Upvote 0
Thanks again.
However, eh ... no offense meant, really not!
But what is the difference?
under 'enter date' I paste a column with unique values of all the dates, the source column is close to 900 rows, I remove all duplicates and paste the result in colunm D.

Anyway, matter is solved now.

=
 
Upvote 0
You could add a formula in Col C which flags your red values.
C1: =IF(B1>=B2,0,1) and copy down
 
Upvote 0
Ah! Nice indeed!
Thank you!
as I need the earliest time, I guess the formula should be just the other way round.
tried to paste the formula here, but it doesn't work, only first few characters are displayed.
anyway, you will understand.
Thanks for the very good suggestion - without any disrespect to others!

filter on '1' copy / paste results as value in another sheet.

Thanks again!

DateTimeFilter
22-03-201713:09:490
22-03-201712:34:510
22-03-201712:32:320
22-03-201712:32:140
22-03-201704:33:140
22-03-201704:32:550
22-03-201703:09:531
21-03-201716:41:250
21-03-201716:39:160
21-03-201716:38:570
21-03-201711:20:550
21-03-201711:18:050
21-03-201711:07:270
21-03-201710:30:030
21-03-201710:22:530
21-03-201710:22:320
21-03-201703:29:501
20-03-201717:09:570
20-03-201716:59:310
20-03-201716:59:120
20-03-201714:14:320
20-03-201712:57:420
20-03-201705:39:181
19-03-201718:59:330
19-03-201718:57:450
19-03-201718:57:250
19-03-201703:57:071

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,510
Messages
6,125,223
Members
449,216
Latest member
biglake87

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