+ Reply to Thread
Results 1 to 11 of 11

Calculate time outside of specified ranges

Hybrid View

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

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

  2. #2
    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.

  3. #3
    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