Solved

Timesheet analysis from list of events - find Earliest/Latest per day to calculate duration.

Posted on 2015-02-03
8
80 Views
Last Modified: 2015-02-17
Hi,
I've got a list of events generated by a door pass security system.  I need to find the earliest event for each day, and then the latest for that same day, and hence the onsite duration.

The list of events just runs in time order through the whole month, and there could be any number of events during the day.

Ultimately, I need to build monthly totals, but just want to figure out a good way of getting the daily values for now.

I've written some formulae to check when the date changes (ie a first or last event), but I can't figure how to subtract that from the previous event when there's an unknown number of rows in between.

Sorry, I have no VBA skills to speak of, and am a bit ignorant about PivotTables, both of which may help.  Happy to learn, though!

The attached file is a summary, but there will be more data - approx. 600 rows/person for a month is not uncommon.
Cheers, Danny
--corp.ubp.ch-LDN--Groups-Groupes-london
0
Comment
Question by:Danny Child
  • 5
  • 3
8 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40586263
Yes, a PivotTable would be perfect for you.

See attached.
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40586273
You say that you are "happy to learn" about PivotTables. Then can I suggest a very quick, crash, course. All of four pages. :-)

This first article introduces how you do a basic PivotTable.

The second article is about working with PivotTable date ranges, and shows how I did this date analysis (but you need to read the first article first).

The third is about adding graphs and interactivity to PivotTables, and the fourth includes more interactivity with Timelines.

Hope it helps.
0
 
LVL 23

Author Comment

by:Danny Child
ID: 40586340
Thanks Phillip, starting the reading now...
by the way, was there supposed to be an attachment on your first post?
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40586345
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40586349
Have a look at the spreadsheet first, then see the articles, and you will see how easy it can be to do this.
0
 
LVL 23

Author Comment

by:Danny Child
ID: 40586410
Thanks, that does indeed look ideal.  I'll give it some time to get my head around it...
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40586538
Create a PivotTable as the first article, and then group by Day as per the second article.

Then add the date field twice to the values, and change one to Min (double-click on it to get that dialog box) and one to Max.

Then add a formula to get the difference.
0
 
LVL 23

Author Closing Comment

by:Danny Child
ID: 40615994
Worked perfectly.  How I did it:
Had my enormous list of events, clicked any cell in them.
Insert tab.. PivotTable - dialog box appears at right.
Drag my Date/Time entry from the top of the dialog box to the Row Labels box, lower left.
R-click the newly created date colum, and unselect the Grouping entry for Months, and instead pick Days.
Drag my Date/Time entry down again, but this time to the Values box, lower right.  Repeat this.
on the 2 newly created columns, r-click one to show Min, and the other to show Max.
add some columns to subtract Min from Max, giving Hours/Day.

had to monkey about with date and time formatting to get it pretty, and also I threw in some  SumIf statements to calculate weekly and monthly totals, but all good.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now