Identifying Entries of Multiple People by Time

FrenchCelt

Board Regular
Joined
May 22, 2018
Messages
214
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm trying to create a macro that will boil down a huge dataset into a simple table that identifies the last 1st activity of everyone in a department and then the 1st last activity.

If that doesn't make sense, I'll try to clarify by giving an example of what the data looks like:

Date CreatedUserDepartment
Apr 29, 2020 6:19:29 AMuser1of_1
Apr 29, 2020 6:20:36 AMuser1of_1
Apr 29, 2020 6:21:22 AMuser1of_1
Apr 29, 2020 6:21:40 AMuser1of_1
Apr 29, 2020 6:24:44 AMuser1of_1
Apr 29, 2020 6:25:07 AMuser1of_1
Apr 29, 2020 6:25:42 AMuser1of_1
Apr 29, 2020 6:26:14 AMuser1of_1
Apr 29, 2020 6:26:51 AMuser2of_1
Apr 29, 2020 6:27:54 AMuser2of_1
Apr 29, 2020 6:28:40 AMuser2of_1
Apr 29, 2020 6:29:00 AMuser2of_1
Apr 29, 2020 6:29:51 AMuser2of_1
Apr 29, 2020 6:29:54 AMuser2of_1
Apr 29, 2020 6:30:24 AMuser2of_1

The data goes on for quite a while, with several other users and 3 other departments. This is basically a list of all the work they did, so I want to be able to display who was the last person to start working and the first person to stop working for a given day. If I wanted to do it manually, I might filter by individual and color the cell of every first entry yellow and the cell of every last entry red and then filter for all the yellows and identify the last one chronologically and copy the date/time data and user to the table, then repeat for the first one chronologically for all the reds, but I can't figure out how to do something like that in VBA.

Does anyone have any suggestions?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You could convert all that data into a table and then create a Pivot Table from that

user name would be the column for the pivot table, while the values would be MIN of the start times.

That would give you a Pivot Table showing each worker against the time that they started working. =MAX of that would give you the latest starting time.


Similarly to find the first stop time.
 
Upvote 0
This looks promising. I've tinkered around a bit and created a workable pivot table and will set about coding it in VBA to automate the process. Thanks for the suggestion!
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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