+ Reply to Thread
Results 1 to 5 of 5

Determining Time Between Two Dates With Time Within Work Hours

  1. #1
    Registered User
    Join Date
    10-07-2015
    Location
    Ardmore, Oklahoma
    MS-Off Ver
    2010
    Posts
    2

    Determining Time Between Two Dates With Time Within Work Hours

    So I have two columns. Column A has a start date and time, and column B has end date and time. I am wanting to have column C to have the time between start and end times. Also, a work day is only from 8:00 am to 5:00 pm, so I don't want to have the after hours counted in the calculation. So for example, if I start on 10/7/2015 8:00 am and end at 10/8/2015 9:30 am the result should be 10.5 hours. In column C I want the output to be formatted as 10:30.

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Determining Time Between Two Dates With Time Within Work Hours

    This is how I managed to do it. A few helper columns, maybe you can use this to find a more compact solution.
    Cell formatting must be precise - time and date where needed.
    Attached Files Attached Files

  3. #3
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Determining Time Between Two Dates With Time Within Work Hours

    Do you want the weekends to be excluded as well (Saturday, Sunday)?

  4. #4
    Registered User
    Join Date
    10-07-2015
    Location
    Ardmore, Oklahoma
    MS-Off Ver
    2010
    Posts
    2
    Quote Originally Posted by cbatrody View Post
    Do you want the weekends to be excluded as well (Saturday, Sunday)?
    Totally forgot about those. Yes, I want those excluded.

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Determining Time Between Two Dates With Time Within Work Hours

    Hi,

    See the attached sample file. I have created the following formula that calculates the time difference between two dates (along with time) excluding weekends & holidays & also time before 8:00 AM and after 5:00 PM.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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: 3
    Last Post: 06-05-2015, 08:56 AM
  2. Replies: 5
    Last Post: 06-05-2015, 05:46 AM
  3. IF function to work out Ordinary hours, Time 1/2 and Double time!!
    By Jazzy2009 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-13-2014, 11:32 PM
  4. Determining how many hours are in a time range
    By lesoies in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-05-2013, 06:19 AM
  5. [SOLVED] Help with determining the number of regular vs. overtime hours within a set time frame
    By niftysquirrel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2013, 12:52 PM
  6. Replies: 0
    Last Post: 11-12-2012, 04:49 AM
  7. Replies: 5
    Last Post: 11-04-2011, 06:38 PM

Tags for this Thread

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