Solved

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

Posted on 2015-02-03
8
84 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40586345
0
 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

732 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