Counting total hours at an interval basis

fullysic

New Member
Joined
Aug 9, 2010
Messages
20
Hi Guys,

I have a project that i'm working on and it's giving me a bit of grief at the moment. If you can help at all it would be much appreciated!

Essentially what i'm trying to do is have chart broken into intervals throughout the day (8:00AM - 8:00PM) and be able to see is the total hours spent in various segment codes - eg. breaks, training.

I have a data source that will give the various start times and finish times for these segments, and I just need to figure out the formula to count the total hours, for each segment, for all employees at each half hour interval.

I have a sample sheet that I have created that will give you some idea. I have filled in the results that I should see in the compiler tab, and I have included sample data that is very similar to what i'm working with. If you could even point me in the right direction I would be forever greatful! Also if you would like me to elaborate on anything please let me know.

http://www.speedfile.org/283339


Thankyou in advance!
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,271
Put this in B2 and Drag\Copy it down column B
Code:
=COUNTIFS('Data Source'!A:A,"<="&A2,'Data Source'!B:B,">"&A2,'Data Source'!C:C,"BREAK")*0.5
Put this in C2 and Drag\Copy it down column C
Code:
=COUNTIFS('Data Source'!A:A,"<="&A2,'Data Source'!B:B,">"&A2,'Data Source'!C:C,"TRAINING")*0.5
 

fullysic

New Member
Joined
Aug 9, 2010
Messages
20
Put this in B2 and Drag\Copy it down column B
Code:
=COUNTIFS('Data Source'!A:A,"<="&A2,'Data Source'!B:B,">"&A2,'Data Source'!C:C,"BREAK")*0.5
Put this in C2 and Drag\Copy it down column C
Code:
=COUNTIFS('Data Source'!A:A,"<="&A2,'Data Source'!B:B,">"&A2,'Data Source'!C:C,"TRAINING")*0.5
Thanks so much AlphaFrog! This is exactly what I was looking for. You're a champion!
 
Last edited:

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,875
Messages
5,513,925
Members
408,978
Latest member
Ken0356

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top