Extracting the earliest and latest (Time)

-emma-

Board Regular
Joined
Jul 14, 2006
Messages
180
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Some information is produced at work and I need to pull certain information from it - which I can do but it takes a long time. I am sure some smart person can work something for me to make it so much easier for me.
Below is what we get produced:

John00:0007:56
John
07:5612:02
John12:0212:36
John12:3616:15
John16:15+00:00
Emma00:0009:00
Emma09:0017:00
Emma17:00+00:00

What I need pulling is below:
JohnEarliest07:56
JohnLatest16:15
EmmaEarliest09:00
EmmaLatest17:00

I would really appreciate someones help on this please - Thank you!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

IF you have Microsoft 365, you could see if this does what you want.

22 02 21.xlsm
ABC
1
2John0:007:56
3John7:5612:02
4John12:0212:36
5John12:3616:15
6John16:15+00:00
7Emma0:009:00
8Emma9:0017:00
9Emma17:00+00:00
10
11
12JohnEarliest7:56
13JohnLatest16:15
14EmmaEarliest9:00
15EmmaLatest17:00
16
Earliest Latest
Cell Formulas
RangeFormula
A12:A15A12=LET(u,UNIQUE(A2:A9),INDEX(u,SEQUENCE(2*ROWS(u),,,0.5)))
B12:B15B12=INDEX({"Earliest","Latest"},MOD(ROW(A12#)-ROW(B$12),2)+1)
C12:C15C12=IF(B12#="Earliest",MINIFS(C$2:C$9,A$2:A$9,A12#),MAXIFS(B$2:B$9,A$2:A$9,A12#))
Dynamic array formulas.
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

IF you have Microsoft 365, you could see if this does what you want.

22 02 21.xlsm
ABC
1
2John0:007:56
3John7:5612:02
4John12:0212:36
5John12:3616:15
6John16:15+00:00
7Emma0:009:00
8Emma9:0017:00
9Emma17:00+00:00
10
11
12JohnEarliest7:56
13JohnLatest16:15
14EmmaEarliest9:00
15EmmaLatest17:00
16
Earliest Latest
Cell Formulas
RangeFormula
A12:A15A12=LET(u,UNIQUE(A2:A9),INDEX(u,SEQUENCE(2*ROWS(u),,,0.5)))
B12:B15B12=INDEX({"Earliest","Latest"},MOD(ROW(A12#)-ROW(B$12),2)+1)
C12:C15C12=IF(B12#="Earliest",MINIFS(C$2:C$9,A$2:A$9,A12#),MAXIFS(B$2:B$9,A$2:A$9,A12#))
Dynamic array formulas.
Hi,

Thank you for the advice on updating my account details - I have done that now - and I am using Microsoft 365.


Also, thank you for your help with the solution - however the column A doesn't seem to want to work for me. I have attached a screen show below. Do you think it is something I am doing?

Thanks again!

Emma
 

Attachments

  • Capture.JPG
    Capture.JPG
    51.9 KB · Views: 6
Upvote 0
I have done that now - and I am using Microsoft 365.
Great. Thanks. (y)

however the column A doesn't seem to want to work for me.
Looks like you do not have the LET function (perhaps you have some updates to do?) so you should be able to use this instead.

22 02 21.xlsm
ABC
1
2John0:007:56
3John7:5612:02
4John12:0212:36
5John12:3616:15
6John16:15+00:00
7Emma0:009:00
8Emma9:0017:00
9Emma17:00+00:00
10
11
12JohnEarliest7:56
13JohnLatest16:15
14EmmaEarliest9:00
15EmmaLatest17:00
16
Earliest Latest (2)
Cell Formulas
RangeFormula
A12:A15A12=INDEX(UNIQUE(A2:A9),SEQUENCE(2*ROWS(UNIQUE(A2:A9)),,,0.5))
B12:B15B12=INDEX({"Earliest","Latest"},MOD(ROW(A12#)-ROW(B$12),2)+1)
C12:C15C12=IF(B12#="Earliest",MINIFS(C$2:C$9,A$2:A$9,A12#),MAXIFS(B$2:B$9,A$2:A$9,A12#))
Dynamic array formulas.
 
Upvote 0
Solution
Great. Thanks. (y)


Looks like you do not have the LET function (perhaps you have some updates to do?) so you should be able to use this instead.

22 02 21.xlsm
ABC
1
2John0:007:56
3John7:5612:02
4John12:0212:36
5John12:3616:15
6John16:15+00:00
7Emma0:009:00
8Emma9:0017:00
9Emma17:00+00:00
10
11
12JohnEarliest7:56
13JohnLatest16:15
14EmmaEarliest9:00
15EmmaLatest17:00
16
Earliest Latest (2)
Cell Formulas
RangeFormula
A12:A15A12=INDEX(UNIQUE(A2:A9),SEQUENCE(2*ROWS(UNIQUE(A2:A9)),,,0.5))
B12:B15B12=INDEX({"Earliest","Latest"},MOD(ROW(A12#)-ROW(B$12),2)+1)
C12:C15C12=IF(B12#="Earliest",MINIFS(C$2:C$9,A$2:A$9,A12#),MAXIFS(B$2:B$9,A$2:A$9,A12#))
Dynamic array formulas.
Peter - this worked great for me! Thank you for your time and effort on this.

Regarding the update - As its a work PC and I am not the admin, these things are beyond my control. I have however escalated it to our IT department as I also found some functions with PowerPoint disabled (for no reason) for users.

Thanks again for your help on this :)
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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