+ Reply to Thread
Results 1 to 5 of 5

calculating the number of working hours including saturday

  1. #1
    Registered User
    Join Date
    06-30-2010
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    3

    calculating the number of working hours including saturday

    Hi

    I am trying to calculate the number of hours that 1 take to respond to a request.

    I have been able to do it except for the row highlighted in red.


    A1 B1 C1 D1
    PSYU00006986 6/15/2010 9:00 6/28/10 13:00 122:00:00

    FORMULA USED:
    =(SUMPRODUCT(INT((WEEKDAY(B2-{2,3,4,5,6,7,1})+INT(C2)-INT(B2))/7),{12,12,12,12,12,5,0})-
    SUMPRODUCT((AM$1:AM$10>B2)*(AM$1:AM$10< C2),LOOKUP(WEEKDAY(AM$1:AM$10),{1,6},{12,5}))+
    (MOD(C2,1)-MOD(B2,1))*24+IF(WEEKDAY(B2)=1,2,8)-IF(WEEKDAY(C2)=8,13,20))/24


    Please help.

    From Mnday-Friday, working hours is 08:00-20:00 and on Saturday it is 08:00-13:00.

    The incoming date/time is in B2 and reponsetime/date is in C2.

    I have to calculate the working hours time taken in D2

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,493

    Re: calculating the number of working hours including saturday

    I am finding it hard to see the red row you speak of.....

  3. #3
    Registered User
    Join Date
    06-30-2010
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: calculating the number of working hours including saturday

    hi
    i tried to attach the excel file but couldn't

    If a request is obtained on 6/15/2010 9:00(recorded in B2) and it is solved on 6/28/10 13:00 (recorded in C2), i get the response time as 122:00:00 (calculated in D2) using the formula =(SUMPRODUCT(INT((WEEKDAY(B2-{2,3,4,5,6,7,1})+INT(C2)-INT(B2))/7),{12,12,12,12,12,5,0})-
    SUMPRODUCT((AM$1:AM$10>B2)*(AM$1:AM$10< C2),LOOKUP(WEEKDAY(AM$1:AM$10),{1,6},{12,5}))+
    (MOD(C2,1)-MOD(B2,1))*24+IF(WEEKDAY(B2)=1,2,8)-IF(WEEKDAY(C2)=8,13,20))/24

    But the correct answer is 110hrs.

    someone please help me to solve this.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: calculating the number of working hours including saturday

    care to explain why you think the answer should be 110 hours rather than 122 ... by my reckoning 122 is correct.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-30-2010
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: calculating the number of working hours including saturday

    yeah it's the correct result.
    I did a very stupid thing!!!Mistook the the 15th to be a Wednesday so missed out a whole day!!!
    Thanks for your clear explanation.
    Really appreciate it

+ 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