+ Reply to Thread
Results 1 to 7 of 7

Calculate overlaps in time and date data in Excel

  1. #1
    Registered User
    Join Date
    09-03-2018
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2016
    Posts
    3

    Calculate overlaps in time and date data in Excel

    Hi all
    I am new to the group and an intermediate excel user. I really need help. I have searched through this forum and found a similar question, but the answer does not work on my data.

    I have Plant Downtime data, where time is recorded against a machine for stop and start again, as well as the date of the stop
    The easier part of the question is, how do I calculate the overlapped time (to remove double counting of standing time), for a specific data. The overlap could be partial or full, and the start times are not necessarily the same.

    I do not know how to upload my data, but it comprise
    Column A - Object (Machine no)
    Column B - Date of event
    Column C - Time breakdown commence
    Column D - Time breakdown stops

    The more difficult one would be, how do I tell the program to only look at one specific object when calculating overlaps in time (i.e only overlaps when that specific machine has downtime recorded against it)

    (I know this sounds impossible, but sometimes 2 artisans are working on the same machine, and both submit electronic job cards in which they indicate a stoppage time that overlaps - sometimes not 100%).
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-22-2017
    Location
    INDIA
    MS-Off Ver
    EXCEL 2007
    Posts
    106

    Re: Calculate overlaps in time and date data in Excel

    upload result format

  3. #3
    Registered User
    Join Date
    09-03-2018
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Calculate overlaps in time and date data in Excel

    Hi Chandy,
    do not understand your reply? Did you upload a document with a solution? I did upload an excel file with some of my data, but I am struggling with the website.
    Regards
    Nerina

  4. #4
    Forum Contributor
    Join Date
    12-22-2017
    Location
    INDIA
    MS-Off Ver
    EXCEL 2007
    Posts
    106

    Re: Calculate overlaps in time and date data in Excel

    what is your output? update in your sample Excel file.

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Calculate overlaps in time and date data in Excel

    Hi Nerina,

    Unfortunately, this is not especially easy problem in excel, and I can hardly imagine (If I understood the requirement correctly) it can be effectively solved with formulas.

    I prepared (not optimized, but works reasonably fast) macro to do that.
    Original times are copied as reference to columns E and F
    then a list of machines is created in column G and for each machine the time off/on is adjusted to eliminate potential overlapping downtimes.
    then sum of downtimes for each machine is listed in column H
    finally the same procedure of ovelapping time adjustment is executed on all events listed in columns A:D despite the machine.

    So for your sample data: total down time (as listed) was
    128:34:00
    after corrections for overlapping down times for each machine it was
    117:54
    but after overlapping between machines has been eliminated only
    115:56:00
    of "genuine" downtime has been noted.

    See the code:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  6. #6
    Registered User
    Join Date
    09-03-2018
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Calculate overlaps in time and date data in Excel

    Hi Kaper

    Thank you so much for assisting. I will have to take time to work through it - wish I understood Macros. I really appreciate you taking the time to do this for me!

    Regards,
    Nerina

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Calculate overlaps in time and date data in Excel

    Quote Originally Posted by Kaper View Post
    ... Unfortunately, this is not especially easy problem in excel, and I can hardly imagine ... it can be effectively solved with formulas....
    Thank you Kaper! I began to think I had lost my mind.

    But then again ....
    Dave

+ 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. calculate time frames total without overlaps
    By happyhippo79 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 01-29-2017, 06:58 AM
  2. Replies: 11
    Last Post: 10-24-2016, 08:12 PM
  3. Checking for time overlaps against given points in the day
    By alex440000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2016, 01:15 PM
  4. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  5. Help in checking for overlaps in time across sheets
    By TMartin79 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2013, 03:42 PM
  6. Tracking Date and Time overlaps
    By kukarooza in forum Excel General
    Replies: 11
    Last Post: 10-11-2013, 09:09 AM
  7. Series of help: including if time overlaps
    By freeurmind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2013, 06:32 AM

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