+ Reply to Thread
Results 1 to 6 of 6

Calculate Completion Date and Time with Conditions and Exclusions

  1. #1
    Registered User
    Join Date
    09-28-2023
    Location
    London, England
    MS-Off Ver
    MS 365 Version 2307 64-bit
    Posts
    24

    Calculate Completion Date and Time with Conditions and Exclusions

    Hi all,

    I am working on a sheet where I need to calculate the estimated date and time of completion for an item.
    The completion date and time, however, needs to exclude weekends, holidays (in a named range called "Holidays" in the example sheet), must only count the hours that fall between the working hours of 08:30 and 17:00, and must only show a result with a time that fall between 08:30 and 17:00.

    Is this possible?

    Many thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Calculate Completion Date and Time with Conditions and Exclusions

    If the added date and time is always during business time, please try and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-28-2023
    Location
    London, England
    MS-Off Ver
    MS 365 Version 2307 64-bit
    Posts
    24

    Re: Calculate Completion Date and Time with Conditions and Exclusions

    Hi!
    Thank you so much, that is perfect! I've been stuck playing with this for 3 days so I can't thank you enough.
    If you have time, would you mind explaining what the parts of the formula do so I can learn for next time?

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Calculate Completion Date and Time with Conditions and Exclusions

    s,TIME(8,30,0): s: The starting time of a business day
    e,TIME(17,0,0): e: The ending time of a business day
    l,e-s: l: The length of a business day
    x,MOD(F3,l), x: The additional time required after subtracting as many full business days as possible
    h,WORKDAY(D3,F3/l+(x+E3>e), h: The date the work is completed
    x+E3-l*(x+E3>e): The time the work is completed

    You're welcome. Thanks for the feedback and glad to have helped. .

    Please take a moment and consider clicking the "Add Reputation" button at the foot of any of the posts of anyone who helped you reach a solution here today.
    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  5. #5
    Registered User
    Join Date
    09-28-2023
    Location
    London, England
    MS-Off Ver
    MS 365 Version 2307 64-bit
    Posts
    24

    Re: Calculate Completion Date and Time with Conditions and Exclusions

    Thank you for taking the time to explain, and for your help overall!

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Calculate Completion Date and Time with Conditions and Exclusions

    Thanks for the feedback and rep . Glad to have helped.

+ 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. Using VBA to Calculate Estimated Date and Time with Conditions
    By EllenAW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2024, 05:39 AM
  2. [SOLVED] Calculate completion date...NETWORK?
    By Dallas6570 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-17-2020, 11:56 AM
  3. Calculating completion date & time per process
    By Wes3574 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-06-2017, 09:16 AM
  4. Replies: 3
    Last Post: 11-03-2015, 11:10 AM
  5. How can I calculate the completion date?
    By michael.k in forum Excel General
    Replies: 3
    Last Post: 06-23-2015, 08:30 PM
  6. Calculate completion date from start date and duration - only work days
    By Robsheep in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-23-2015, 03:31 AM
  7. Forecast the Completion Date and Time
    By Grock258 in forum Excel General
    Replies: 2
    Last Post: 07-24-2008, 12:05 PM

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