+ Reply to Thread
Results 1 to 2 of 2

Calculate End Date & Time Based on User Input

  1. #1
    Registered User
    Join Date
    03-27-2014
    Location
    Birmingham, UK
    MS-Off Ver
    2010, 2013
    Posts
    4

    Calculate End Date & Time Based on User Input

    Hi,

    In order to assist with machining throughput, the machine shop manager has asked for a spreadsheet to calculate the finish date and time of the set up and machining operations. The idea is that he will input the start date & time, operation number etc into the first tab, then the second will populate after running a macro.

    I have searched the forum (and Google) and found an old post answered by Daddylonglegs which will calculate the end date/time for working days only as follows:

    =WORKDAY(A2,CEILING((B2/24+MOD(A2,1)-E$2)/(F$2-E$2),1)-1)+MOD(A2,1)+B2/24-CEILING(MOD(A2,1)+B2/24-E$2,F$2-E$2)+F$2-E$2

    Where A2 is the start date and time, B2 is the length of the operation, E2 is the shift start time and F2 is the shift end time.

    The issue I have with this as we have shift patterns covering Saturday and Sunday too. Is there any way of actually calculating the end date based the shift patterns (Monday - Friday 06:00 - 21:00 and then Saturday and Sunday 06:00 - 12:00 (note that there is also some down time every day)).

    Any help greatly appreciated!

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

    Re: Calculate End Date & Time Based on User Input

    So have you tried just skip workday and simply add:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

+ 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. Help with Finding Date based on User Input
    By micmcgee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-08-2013, 05:22 PM
  2. Date & time auto generated based on input date & time
    By BlastRanger in forum Excel General
    Replies: 18
    Last Post: 09-08-2010, 03:54 AM
  3. Apply Auto Filter Based on Date Input by User
    By ELDAN in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2010, 09:07 PM
  4. Calculate output for the logic in the attached spreadhseet based on user input
    By tenn0228 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2009, 10:45 AM
  5. Calculate a new date/time based on the input
    By akabraha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2007, 06:30 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