+ Reply to Thread
Results 1 to 5 of 5

Future Date & Time within Business (Office Hours) only

  1. #1
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    271

    Future Date & Time within Business (Office Hours) only

    1 Store Opens at 9 O'Clock (A2) in the Morning and Closes at 7Pm (19:00) (B2) in the evening. So effectively it remains open for 600 minutes (C2)
    This could vary from month to month
    2 So, The difference (C2) between Opening, and Closing Time in Minutes is 600 Minutes. Hourly Difference * 60 minutes
    Background
    3 A4 has point (time) of Sales
    4 A5 has random future date with time
    5 Minutes Difference between 3 & 4, through Cell A4-A5 is in Cell B5.
    6 Minutes Difference in Cell B5 has to be counted during Office Hours , that is, within time between when store remains Open & Close [A2 , B2] , ignoring full 24 hours a day, or 12 hours in a day

    Query
    7 How to find future Date & Time (time only within day when Store is Open) forward based on B5 value, counting either taking Cell A4 as base. (or flexibly, A5, as base)

    I've made some wrong attempts, in Cell D5. Cell D2, E2, F2. may not be useful.

    IS there any shortcut using inbuilt Excel function (1997-2003) version ?

    Or what should be the formula in D5 ?

    Sample Workbook is attached. How to take care of Holiday, in addition to Weekends (Saturday & Sunday).
    Attached Files Attached Files
    Last edited by analystbank; 02-14-2017 at 08:02 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Future Date & Time within Business (Office Hours) only

    Here are two pieces of code that may help.

    The first is workhours: You tell it the start time, number of hours, store open time, store close time and it computes when the completion time is accounting for weekends and (optionally) holidays.
    Please Login or Register  to view this content.
    The second is NetWorkHours: You tell it store open time, store close time, starting time, ending time and it computes the number of hours "in store."
    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    271

    Re: Future Date & Time within Business (Office Hours) only

    Thank you for the customised UDF. I will explore, just now i saw it, but not getting desired, results, may be something i am doing wrong, or cell also need to be formatted properly. As in current case, DAte, and Time both are commonly entered in same cell, this UDF would require splitting both Time and Date.

    I am clear with the second part of the UDF which deals with the net work hours = NetWorkHours.

    But again for Net work hours between 09:20am to 11:25am, the hour difference should be 2 hours 5 minutes, but it gives result of 2.08333 result.
    Last edited by analystbank; 02-15-2017 at 01:45 AM.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Future Date & Time within Business (Office Hours) only

    It is a matter of formatting .0833 is 5/1440 (1440 minutes in a day) or 5 minutes.

  5. #5
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    271

    Re: Future Date & Time within Business (Office Hours) only

    @dflak. Thanks for that clarity, and solution.

+ 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: 8
    Last Post: 01-31-2016, 10:14 AM
  2. Replies: 10
    Last Post: 07-10-2015, 10:40 AM
  3. Replies: 2
    Last Post: 11-12-2014, 11:56 AM
  4. [SOLVED] Adding hours to start time - Business hours/holidays/weekends
    By Thunderer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-21-2014, 01:09 PM
  5. Replies: 0
    Last Post: 04-07-2011, 01:46 AM
  6. time/date tracking only during business hours
    By mmarff in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-04-2009, 06:58 PM
  7. Replies: 0
    Last Post: 05-09-2006, 07:50 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