+ Reply to Thread
Results 1 to 4 of 4

calculate a 24 hour cycle time which excludes weekends and public holidays

  1. #1
    Registered User
    Join Date
    03-11-2009
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    18

    calculate a 24 hour cycle time which excludes weekends and public holidays

    Hi,

    I would like your input in correcting my formula.

    I would like to find out if a job took more than 24 hour cycle time (eg. 6:00 am to 5:59:59 AM next day).

    data :

    A1 = received date & time (format "m/d/yyyy h:mm")
    B1 = completed date & time (format "m/d/yyyy h:mm")

    my formula is '=if(B1-A1>"24:00"+0,"Yes","No")

    The problem with the formula is that it doesnt exclude weekends nor public holidays.

    I couldnt formulate a solution using networkdays function.

    appreciate your help.
    Kind regards,
    Ram

    Solution :

    for 24 hours Monday to Friday

    =if(NETWORKDAYS(C2,W2)-1+IF(NETWORKDAYS(W2,W2),MOD(W2,1),1)-IF(NETWORKDAYS(C2,C2),MOD(C2,1),0)>"24:00"+0,"Yes","No")

    Thankyou Daddylonglegs !!
    Last edited by rammergu; 03-16-2009 at 11:10 PM. Reason: found solution in one of the postings in the forum

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: calculate a 24 hour cycle time which excludes weekends and public holidays

    Why not post the solution to further enhance the archives?

  3. #3
    Registered User
    Join Date
    03-11-2009
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: calculate a 24 hour cycle time which excludes weekends and public holidays

    Hi Bob,

    i included the solution in my first post. here it is again.

    for 24 hours Monday to Friday

    IF(NETWORKDAYS(A2,B2)-1+IF(NETWORKDAYS(B2,B2),MOD(B2,1),1)-IF(NETWORKDAYS(A2,A2),MOD(A2,1),0)>"24:00"+0,"NO","YES")

    Regards,
    Ram

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: calculate a 24 hour cycle time which excludes weekends and public holidays

    Sorry Ram, I missed that, just saw that you had marked it solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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