+ Reply to Thread
Results 1 to 10 of 10

Date and Time calculation - breaks excluded

  1. #1
    Registered User
    Join Date
    05-29-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2016
    Posts
    76

    Date and Time calculation - breaks excluded

    Hello all,

    I am truly having a moment and struggling with this.

    I have a date/time in this format: 31/01/2017 09:00 in C5 and trying to get a desired finish date in the same format in C6.

    This is based on the number of hours to complete the task in a number format in F5. However I want to take in account weekends, breaks and meetings in order to get an accurate completion time and date. A28-C33 contains the below:

    08:00 Start
    08:00 08:15 Meeting
    10:00 10:15 Morning Break
    12:45 13:15 Lunch
    16:15 16:30 Meeting
    16:30 Finish

    Basically Monday-Friday start at 08:15 and finish 16:15 with a 15min break at 10am and 30min lunch at 12:45.

    For example
    C5-30/01/2017 14:00 F5-4 Therefore C6 should be 31/01/2017 10:00

    Any assistance would be greatly appreciated, my mind is getting mixed up.

    Peter
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Date and Time calculation - breaks excluded

    if start is at 0815 then 1st and 2nd meetings are not included, are they?

  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Date and Time calculation - breaks excluded

    can you explain about F5-4 & how comes 31/01/2017 10:00 what is logic.
    For example
    C5-30/01/2017 14:00 F5-4 Therefore C6 should be 31/01/2017 10:00


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Date and Time calculation - breaks excluded

    unfortunetly, solution with worksheet functions is beyong my posibilities
    in the attached file there is a user defined function dttm
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-29-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2016
    Posts
    76

    Re: Date and Time calculation - breaks excluded

    @tim201110 The start time can vary from 7am to 8am therefore the first meeting would be taken in account if a 7am start. I didn't include that as it is an added complexity in the situation.

  6. #6
    Registered User
    Join Date
    05-29-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2016
    Posts
    76

    Re: Date and Time calculation - breaks excluded

    @avk I removed the data in F5 but for example f9 has a value of 5 hours to complete that task. Therefore the time added is to cell C9 to create D9 negative breaks and lunch.

  7. #7
    Registered User
    Join Date
    05-29-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2016
    Posts
    76

    Re: Date and Time calculation - breaks excluded

    @tim201110 I honestly dont know how you have managed that but that does give it as a calculated function I can put in the figures and it gives the answer that is required. I am impressed. How would this work with a 7am start for example?

    Thank you for your assistance.

  8. #8
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Date and Time calculation - breaks excluded

    see the attached
    working hours and state holiday should in the workbook
    one can save UDF as adding
    Attached Files Attached Files
    Last edited by tim201110; 02-27-2017 at 02:06 AM. Reason: more stable version

  9. #9
    Registered User
    Join Date
    05-29-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2016
    Posts
    76

    Re: Date and Time calculation - breaks excluded

    @tim201110 That is brilliant, can I be a pain and ask for a 7:00 start. So would be
    07:00-08:00
    08:15-10:00
    10:15-12:45
    13:15-16:15

    Thank you again so much, that is absolutely brilliant.

  10. #10
    Registered User
    Join Date
    05-29-2012
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2016
    Posts
    76

    Re: Date and Time calculation - breaks excluded

    @tim201110 Thank you for all your help that is exactly what is needed thank you.

+ 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. Replies: 2
    Last Post: 02-03-2017, 07:39 AM
  2. Automatic Net Working Time Calculation Including Breaks
    By eksert in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-29-2016, 04:06 AM
  3. Return oldest date with some dates excluded
    By Stromming in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-30-2014, 06:32 AM
  4. Long date/short date conversion and cycle time calculation
    By COGICPENNY in forum Excel General
    Replies: 1
    Last Post: 02-14-2014, 05:17 PM
  5. [SOLVED]Time/Date calculation to check response time
    By tailz in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-01-2013, 10:20 AM
  6. Calculation of time difference between the Start date & time & End Date & time
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-17-2012, 03:54 PM
  7. Replies: 1
    Last Post: 07-16-2006, 11:35 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