+ Reply to Thread
Results 1 to 9 of 9

How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

  1. #1
    Registered User
    Join Date
    12-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    5

    How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    Hi All,

    I'm having difficulty to calculate hours between 2 or 3 days exclude non working hours.

    Can anyone help? attached is the example of start date with time & end date with time.

    The situation is like "when the case log in till the case assist in working hours." so i will get the hours from case log to case assist.

    Appreciate expert advice.
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    Which are the non working hours / days ?

  3. #3
    Registered User
    Join Date
    12-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    Hello mate,

    Working hours: 8:00 AM till 10:00 PM
    Non Working Hours: 10:01 PM till 7.59 AM

    hope you can help.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    working 7 days a week?

  5. #5
    Registered User
    Join Date
    12-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    yes, working straight 7 days.

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

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    Try this formula

    =(INT(E2)-INT(D2))*("22:00"-"8:00")+MEDIAN(MOD(E2,1),"8:00","22:00")-MEDIAN(MOD(D2,1),"8:00","22:00")

    custom format result cell as [h]:mm
    Audere est facere

  7. #7
    Registered User
    Join Date
    12-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    Hi Mate,

    thanks you, its working.

    much appreciate it. u r awesome.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  9. #9
    Registered User
    Join Date
    12-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How To Calculate Hours Between 2 or 3 Days Exclude Non Working Hours?

    Hello Boss,

    Sorry not familiar with this forum yet, thanks for the explanation.

+ 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] Calculate hours with predefined Working Hours and Weekend Hours
    By garciapliz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-05-2013, 11:17 AM
  2. Replies: 2
    Last Post: 06-14-2013, 10:45 AM
  3. Replies: 1
    Last Post: 09-13-2012, 05:50 AM
  4. Replies: 0
    Last Post: 09-13-2012, 05:28 AM
  5. Replies: 4
    Last Post: 11-30-2011, 03:25 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