+ Reply to Thread
Results 1 to 3 of 3

Compute the total elapsed working time

  1. #1
    Registered User
    Join Date
    04-08-2014
    Location
    Palm Bay, FL
    MS-Off Ver
    Excel 2010
    Posts
    1

    Compute the total elapsed working time

    I have searched high and low for a formula that would compute the total elapsed working time (in minutes) of an event taking into consideration only the working days and specified working hours. I finally broke down and wrote one myself. Here it is ... enjoy!

    Named Ranges:
    • DayStart - time of day business starts
      DayEnd - time of day business ends
      HolidayList - vector of holiday dates
      StartEvent - the date/time of the start of the event
      EndEvent - the date/time of the end of the event

    Formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    How it works?
    Although it appears a little complicated, it basically is:
    The number of minutes in the first day of the event (as long as it is a working day)
    PLUS
    The number of minutes of the last day of the event (also provided it is a working day)
    PLUS
    Number working days between the first day and last day * working minutes in a day
    Attached Files Attached Files
    Last edited by rrlarson; 04-08-2014 at 04:26 AM. Reason: add workbook

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Calculating elapsed time,respecting working hours.

    Hello rrlarson,

    Is that meant to work whatever the start/end dates/times? It doesn't seem to work if the end date is a Saturday for example 09:00 on a Thursday to 09:00 2 days later should give a result of 1020 (480 minutes on Thursday and the whole of Friday, i.e. 540 minutes) .....but your formula gives a result of just 480.

    The standard version I use should work OK for any times (assuming EndEvent >= StartEvent) - here it is converted to use your names

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Audere est facere

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Compute the total elapsed working time

    Moved to a thread of it's own, as per forum rules.

    RRLarson - When you joined the forum recently you agreed to abide by the Forum Rules, but in haste I fear you might not have actually read them. Please stop and take a moment to read them now. We all follow these rules for the benefit of all, as must you. Thanks.

    (link above in the menu bar)


    @DDL - shame on you... Almost gave you a for-fun infraction for that.
    Good thing your so awesome.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. Calculating Elapsed Time within Variable Working Hours
    By TIAL in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-12-2013, 09:17 PM
  2. [SOLVED] Calculating elapsed time,respecting working hours.
    By CoryX in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-10-2013, 04:13 PM
  3. Replies: 31
    Last Post: 09-06-2012, 09:42 AM
  4. [SOLVED] Calc a running total of time elapsed from a timestamp
    By AWilson012 in forum Excel General
    Replies: 3
    Last Post: 07-11-2012, 03:19 PM
  5. Generate total elapsed time with DATEDIF
    By jeffreybrown in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-01-2012, 06:45 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