+ Reply to Thread
Results 1 to 8 of 8

Calculate total hours if time ranges overlap

Hybrid View

  1. #1
    Registered User
    Join Date
    08-04-2013
    Location
    Springsure, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Calculate total hours if time ranges overlap

    Good Afternoon,

    I am trying to determine the total hours of downtime accumulated when there are 2 or more machines down during the same time period. To do this, I need to be able to determine if at any point there are 2 or more pieces of equipment down at the same time, and if this is true, how many hours were overlapped.

    The attached spreadsheet shows how the data is presented. Any help would be much appreciated.

    Kind Regards,

    JL
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-26-2013
    Location
    Makati
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: Calculate total hours if time ranges overlap

    Hi,

    Try see attached file..

    Downtime Reports1.xlsx

  3. #3
    Registered User
    Join Date
    08-04-2013
    Location
    Davis, CA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Calculate total hours if time ranges overlap

    Here is the modified spreadsheet and a word doc explaining the logic
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-04-2013
    Location
    Springsure, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Calculate total hours if time ranges overlap

    Hi MikeNDavis,

    Thank-you for your quick response to my thread and apologies that it has taken me so long to reply. The spreadsheet you worked on for me re: overlapping downtime hours is working great and I'm very grateful for your help.

    The only issue I am currently having is when there are 4 or more pieces of equipment down over the same time period, the overlapped time is calculated more than once. In the attached spreadsheet I have highlighted where this occurs. I have been trying to figure out how this can be fixed but so far I'm not having any luck. I believe it may be able to be fixed by adjusting the Earliest Usable STD formula but other than that I haven't got a clue. If you get a chance would you be able to have a look and give me some advice as to how to solve this?

    Thanks and kind regards,

    JL_Stewart
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Calculate total hours if time ranges overlap

    Pl see attached file with formula for number of overlaps and total duration.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-04-2013
    Location
    Springsure, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Calculate total hours if time ranges overlap

    Thank-you to everyone who has helped me with my Downtime Report so far. I greatly appreciate your help and believe me, I wouldn't have got this far without you!

    The overlapped downtime is working great in most situations, apart from when the order of the data does not allow the formulas to calculate the correct answer. For an example, please refer to rows 65 and 158 of the attached spreadsheet. You will notice that there is another overlapped time to be calculated (in the case of row 65 it needs to calculate the overlap with row 63), but because the "end date" of the entry above is smaller than the "start date" of the current entry, the formula does not go looking for any other entries which may overlap. It also gets tricky because I don't want the formula to double up the overlapped time with other entries.

    Another example is in rows 76 - 84. The total downtime for all of these entries should equal 24 hours, but I cannot get the overlapped time to calculate for all entries.

    There are currently two "Overlap" formulas in the attached spreadsheet. Both are exactly the same apart from the "Earliest Useable STD" time which they refer to. I have left both there to allow me to determine which option works the best. I have also gone through the full spreadsheet and highlighted all correct overlaps in green and the incorrect ones in red.

    I am now pretty much stumped as to how to solve these last few issues. If anyone has any suggestions or if you think I should attack this a completely different way, I would really appreciate your feedback.

    Kindest Regards,
    JL
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Calculate total hours if time ranges overlap

    I am refering to 4 over lap time.
    For Row number 16 , row numbers 13, 14, 15 are overlap.Totally over laps are 4 and down time is shown as 5.42.You have marked red in another column.
    This is bit confusing.

    What is the result expected in ROW 16 for 4 over lap time.

    Down time for only 2 overlaps is given in Column T of the attached file.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 09-02-2013 at 07:03 AM.

  8. #8
    Registered User
    Join Date
    12-02-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Calculate total hours if time ranges overlap

    I have the same problem. Have this problem been solved? thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula Needed - Calculate total hours that fall between a specific time period.
    By JennyGP in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 04-19-2020, 02:44 AM
  2. [SOLVED] Overlap between two time ranges
    By LondonJames in forum Excel General
    Replies: 11
    Last Post: 07-12-2019, 02:18 AM
  3. Replies: 7
    Last Post: 06-27-2011, 06:19 AM
  4. Calculate Total Time when Dates/Times Overlap
    By Steve Gilley in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2008, 07:43 PM
  5. Calculate total Hours between 2 date and time
    By Tylim in forum Excel General
    Replies: 3
    Last Post: 05-08-2006, 10:20 PM

Tags for this Thread

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