[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2015-02-03
8
Medium Priority
?
89 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

650 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