Sum up active times for duplicate user entries. Isolate array and process times.

AWM21

New Member
Joined
Aug 2, 2021
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a sheet of data in excel and I need to get the total minutes engaged per user.
Most the users have a single row hosting their start and stop times. (Cell B1=UserName; B2=StartDateTime; B3=StopDateTime). I can get total number of minutes pretty easy from that, so no issue there.
**(DateTime is formatted like this: (2021-06-09 14:02:43)

Where I'm having an issue is that some of the data has duplicate user entries, where each duplicate will have a new start and stop time.
  • Example:
    • *Jon was engaged for the entire session, no interruptions. John has a single data row with one start & stop time.
    • *Jane was in and out of the session, so her data shows that she logged in and out several times resulting in many duplicate entries. I would like to isolate Jane's array and sum up her total time in the session.
Now picture I have 1000 users but 150 of them are like Jane & have multiple entries that might result in 6 or 7 duplicate entries per user.
How can I isolate the duplicate entries, add up the date/times by user, and then use that compiled data with the original data sheet?

I feel like/hope this can happen pretty easily with VB.
Thank You!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Welcome to the MrExcel forum!

I'm not clear on your sheet layout, but perhaps something like this:

Book1
ABCDEFG
1NameStartStopNameTime
2Jon2021-06-09 14:02:432021-06-09 15:02:49Jane0:50:47
3Jane2021-06-10 15:01:002021-06-10 15:35:55Jerry1:00:01
4Jerry2021-06-11 16:00:002021-06-11 17:00:01Jon1:00:06
5Jane2021-06-10 15:45:082021-06-10 16:01:00
6
Sheet5
Cell Formulas
RangeFormula
F2:F4F2=SORT(UNIQUE(B2:B5))
G2:G4G2=SUMIF(B:B,F2#,D:D)-SUMIF(B:B,F2#,C:C)
Dynamic array formulas.
 
Upvote 0
Solution
Hello Eric! Thank you for the help today. I displayed the cells inaccurately in the above post. Should have been A1=Name; B1=TimeStart; C1=TimeStop.
Sorry for that.

This formula looks like it will work perfectly! I'm excited to get in front of the data and plug it in!
Thanks again!!
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

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