+ Reply to Thread
Results 1 to 4 of 4

Please help with formula to calculate elapsed business days & time from two combined cells

  1. #1
    Registered User
    Join Date
    01-21-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    19

    Please help with formula to calculate elapsed business days & time from two combined cells

    Hello everyone. I am trying to calculate the amount of lapsed time between two dates and times. Each date and time combo are combined into one cell. I also need to take into account for business days and stock market hours (9:30am-4:00pm). I am having problems combining the NETWORKDAY formula with time within the same cell. Can someone PLEASE help? I've attached a spreadsheet with what I'm dealing with. Thank you very much.
    Attached Files Attached Files

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

    Re: Please help with formula to calculate elapsed business days & time from two combined c

    Assuming that "Entry time and date" and "Exit time and date" will always be within the working hours use this formula in U13 for elapsed work hours

    =MAX(0,(NETWORKDAYS(C13,E13,Z$14:Z$200)-1)*W$15+MOD(E13,1)-MOD(C13,1))

    format as [h]:mm and for your example you'll get 0:07. it will work over any period of time
    Audere est facere

  3. #3
    Registered User
    Join Date
    01-21-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Please help with formula to calculate elapsed business days & time from two combined c

    Quote Originally Posted by daddylonglegs View Post
    Assuming that "Entry time and date" and "Exit time and date" will always be within the working hours use this formula in U13 for elapsed work hours

    =MAX(0,(NETWORKDAYS(C13,E13,Z$14:Z$200)-1)*W$15+MOD(E13,1)-MOD(C13,1))

    format as [h]:mm and for your example you'll get 0:07. it will work over any period of time
    Hello daddylonglegs. Thank you very much! Repped.

    This seems to work for intra-day trades, but I don't think it is returning the correct value for multiple day computations. For example, please see attached. I updated the entry date to a few days earlier, and the value is still sub 1. Any ideas?
    Attached Files Attached Files

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

    Re: Please help with formula to calculate elapsed business days & time from two combined c

    15/04/2000 was a Saturday, is it valid for the entry date to be a Saturday? If so then you need a different formula, if not then try making it 14/04/2000 09:30 and custom format result cell as [h]:mm you'll get 6:37 which is correct for Friday to Monday

+ 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. [SOLVED] Formula elapsed time (business hours only)
    By resida in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-12-2012, 03:40 PM
  2. Replies: 2
    Last Post: 04-27-2011, 08:21 AM
  3. How to calculate elapsed time between to days excluding weekends.
    By Mush001 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-23-2009, 04:19 PM
  4. [SOLVED] Ref: Formula to calculate elapsed time between certain dates and t
    By DrBarqs in forum Excel General
    Replies: 2
    Last Post: 11-18-2005, 07:20 PM
  5. Replies: 6
    Last Post: 03-25-2005, 03:06 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