+ Reply to Thread
Results 1 to 9 of 9

Help - formula(s) for showing hours between start/stop (Novice user)

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Omaha, Nebraska
    MS-Off Ver
    2007
    Posts
    23

    Help - formula(s) for showing hours between start/stop (Novice user)

    I've been tasked with showing employee schedules by half-hour. I have the start time (e.g 8.5 or 8:30a) and the duration (8 hours) I've been asked to count all employees in each half hour, if they are working. So if an employee starts at 8:30 and works until 4:30 they would show as working for each half hour between 8:30 and 4p. Ideally a 1 would noted in every half hour between the times, so it can easily by summarized.

    Any suggestion on what functions could be used or how this could be done? Here is an example of 1 record

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    Quote Originally Posted by brianjluke View Post
    Here is an example of 1 record
    It looks like that example didn't get posted.

    It may be better to post a SMALL sample file so we can see how your data is structured.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    05-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    Hi where is the example?

  4. #4
    Registered User
    Join Date
    05-15-2013
    Location
    Omaha, Nebraska
    MS-Off Ver
    2007
    Posts
    23

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    Example.xlsxThanks so much for the assistance. Attached is one set of records for an employee,and I have a 168 more datasets just like it.

    Thank you

  5. #5
    Forum Contributor
    Join Date
    05-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    Can I just ask something, you want to count how many 1/2 hrs that person has worked? per day? then you sum the total at the end?

  6. #6
    Registered User
    Join Date
    05-15-2013
    Location
    Omaha, Nebraska
    MS-Off Ver
    2007
    Posts
    23

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    ExampleEndResult.xlsx

    Yes, but need to show each half hour noted as 1 if they are working. Attached is the example with added end result needed

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    Not extensively tested...

    This formula entered in H13:

    =--OR(AND(H12>=$C13/24,H12<$D13/24),AND(H12>=$E13/24,H12<$F13/24))

    Copy across to BC13 then down as needed.

  8. #8
    Registered User
    Join Date
    05-15-2013
    Location
    Omaha, Nebraska
    MS-Off Ver
    2007
    Posts
    23

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    Thank you. This works great, however still have one small issue. When the start time is on the quarter hour, for example 11.25 or 11:15, a 1 needs to be in the 11am interval, The formula puts a 1 in the next interval. Is there a way to change it?

    Thanks again for the help.

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help - formula(s) for showing hours between start/stop (Novice user)

    Maybe this...

    Time increments starting in cell H1.

    Entered in H2 and copied across:

    =--OR(OR(AND(HOUR(H1)=INT($C2),H1<$D2/24),AND(H1>=$C2/24,H1<$D2/24)),AND(H1>=$E2/24,H1<$F2/24))

+ 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