+ Reply to Thread
Results 1 to 3 of 3

calculating a time range into predefined time slots

  1. #1
    Registered User
    Join Date
    06-18-2012
    Location
    Bonavista, Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    calculating a time range into predefined time slots

    I have a two columns one with a start time and the other with an end time. These times can be any amount of time during the day and in 24 hour time format for example the start could be 03:43:00 and the end could be 6:13:00. I then have 6 other columns that break the day up into 4 hour time slots for example the first is 0:01-4:00 second 4:01-8:00 and so on. What my objective is to calculate the sum of the hours using only the start and end times and then separate the totals into each time slot. So using the above example of the start 03:43:00 we will say it is A1 and the end 6:13:00 in B1 then 00:17:00 would be in the 0:01-4:00 time slot and 02:13:00 would be in the 4:01-8:00 time slot.

    I have a good knowledge of web programming and databases but I just don't know excel forumulas very well. If I can't get this I'm just going to make a database and use a web UI to do my queries but here is an example of what I started doing for the first time slot but I know its way off the mark
    =SUM((B1<=TIME(4,0,0))-(A1>=TIME(0,1,0)))
    Last edited by DamianWarS; 06-18-2012 at 04:32 PM.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: calculating a time range into predefined time slots

    Hi
    is this what you're after
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-18-2012
    Location
    Bonavista, Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: calculating a time range into predefined time slots

    that works well... I understand your logic in the formula and it was a smart thing to subtract the running total from in each new time slot. I may add some rounding to it to the nearest half hour but I think it might be best left rounded by the human eye for the time being. It is for time sheets and in the end the final version needs to be hand written on an official time sheet and this would just be by my personal record but make the process much more easy and error free for me. thanks!
    Last edited by DamianWarS; 06-19-2012 at 06:43 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1