+ Reply to Thread
Results 1 to 11 of 11

Calculate time outside of specified ranges

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Calculate time outside of specified ranges

    Explain again what you want in col M?
    Entia non sunt multiplicanda sine necessitate

  2. #2
    Registered User
    Join Date
    10-17-2008
    Location
    US
    Posts
    35

    Re: Calculate time outside of specified ranges

    I want to modify column J so that it only tallies the duration OUTSIDE of the excepted times in rows F5 / F6, H5 / H6 and J5 / J6 ... or discounts the duration entirely if a checkbox or drop down is selected.

    ooh ... missed another crucial part ... the only time that counts is the time between B5 and B6 ... for instance if the shift is 8 am to 5 pm and there is a PROJ from 4:45 to 5:05 ... then the time is REALLY 4:45 to 5:00. The way I have it set up both the start time AND the stop time would have to be within the shift in order to count. That's wrong.

    Geez I'm even confusing myself at this point.
    Last edited by delirium; 12-12-2009 at 08:17 PM.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Calculate time outside of specified ranges

    Still not sure what you're trying to do. Maybe this.
    Attached Files Attached Files

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,711

    Re: Calculate time outside of specified ranges

    To calculate how much of the time falls within the start and end times in C5/C6 but not within the break times then you could use this formula in K11 copied down

    =MAX(0,MIN(I11,C$6)-MAX(G11,C$5))-MAX(0,MIN(I11,G$6)-MAX(G11,G$5))-MAX(0,MIN(I11,I$6)-MAX(G11,I$5))-MAX(0,MIN(I11,K$6)-MAX(G11,K$5))

    Note: your times include seconds so to display full accuracy you need to display as h:mm:ss

    The formula only works assuming all times are on the same day....

  5. #5
    Registered User
    Join Date
    10-17-2008
    Location
    US
    Posts
    35

    Re: Calculate time outside of specified ranges

    That's great daddylonglegs! Thanks ... It seems to work miraculously!!! I think I love you ... and before you get all wound up ... I say that to everyone on this forum. i think you might have just saved my skin. and it does seem to be working for the breaks and lunch period ... did i misunderstand you when you said it wouldn't?

    ** n/m I am brayne ded ... I re-read your post and I understand now. **

    I knew it had something to do with MAX / MIN but ... I just couldn't think it through.
    Last edited by delirium; 12-12-2009 at 09:28 PM.

  6. #6
    Registered User
    Join Date
    10-04-2012
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Calculate time outside of specified ranges

    I am calculating times with in specified ranges. The formulas above work great, but I have several that span midnight. i.e. Start Time is 16:00 and the Stop Time is 02:00. I need it to calculate as follows: 1 hour in the coulumn of 15:00-17:00. 2 hours in the 17:00-19:00 column. 5 hours in the 19:00-24:00 column, and 2 hours in the 24:00-7:00 column.

+ 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