Findinf the first user time and the last user time

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Posting a link to a picture doesn't help much as we cannot copy from that picture to test in our workbook. (Most helpers are not interested in manually typing out the sample data. ;))

Best is to post a small set of dummy sample data and expected results right in your post. My signature block below has help with that.
Failing that you can upload your file to a file-share site and provide a link. However, many of the experienced helpers here choose not to download files from other sites or due to security restrictions at workplaces, are unable to download such files so you will restrict the number of potential helpers if you go down that path
 
Upvote 0
Is taht what you want?

Using PowerQuery
Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Time", type time}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Name"}, {{"First Time", each List.Min([Time]), type time}, {"Last Time", each List.Max([Time]), type time}})
in
    #"Grouped Rows"[/SIZE]
[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#70AD47]Name[/td][td=bgcolor:#70AD47]First Time[/td][td=bgcolor:#70AD47]Last Time[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Aaron Sithole[/td][td=bgcolor:#E2EFDA]
06:26:45​
[/td][td=bgcolor:#E2EFDA]
17:26:52​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Afonce Mandlase[/td][td]
06:21:59​
[/td][td]
17:23:13​
[/td][/tr]
[/table]
 
Upvote 0
Is there a way to do this without using PowerQuery
Yes - quite simple formulas especially if you have Office 365 - and would have posted them long ago if you had posted some sample data that we could actually work with (ref post 4) :)

So these are untested on your sample data but

- if you have the MINIFS and MAXIFS functions.
F3: =MINIFS(B$2:B$11,A$2:A$11,E3)
F6: =MAXIFS(B$2:B$11,A$2:A$11,E6)
Copy these to the other relevant cells.

- if you don't have those functions, still choices. Either
F3: =AGGREGATE(15,6,B$2:B$11/(A$2:A$11=E3),1)
F6: =AGGREGATE(14,6,B$2:B$11/(A$2:A$11=E6),1)

or these which are array formulas so should be entered without the {} but confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will insert the {}. The formulas can then be copied & pasted.
F3: {=MIN(IF(A$2:A$11=E3,B$2:B$11))}
F6: {=MAX(IF(A$2:A$11=E6,B$2:B$11))}
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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