+ Reply to Thread
Results 1 to 5 of 5

Add working hours only to a date and time

  1. #1
    Registered User
    Join Date
    03-16-2007
    Posts
    7

    Add working hours only to a date and time

    I have a spreadhseet which records calls received by my office and monitors response times. I have two columns that record the date and time the call is received. I have a priority column where the user can select the urgency of the call from a drop-down list (Critical, High, Medium, Low). The next column shows the estimated fix time based on the priority.

    I want to enter a forumla in the next column that adds an amount (say 1 hour) to the received date and time. However, i only want to include working hours in this addition - 09:00 till 17:00, Monday till Friday.

    Any ideas?

    Thanks!

  2. #2
    Forum Contributor kraljb's Avatar
    Join Date
    05-26-2004
    Location
    Illinois
    MS-Off Ver
    2007 (recent change)
    Posts
    256
    Date in Column A, Time in Column B

    =IF(AND(WEEKDAY(A1)>1,WEEKDAY(A1)<7,HOUR(B1)>=9,HOUR(B1)<17),B1+TIME(HOUR(B1)+1,MINUTE(B1),SECOND(B1)),"Non-Working")

    To Modify the time added change the HOUR(B1)+1 to whatever you need it to (or add minutes/seconds as desired)

    Hope that helps...
    John

  3. #3
    Registered User
    Join Date
    10-01-2015
    Location
    Lagos
    MS-Off Ver
    2010
    Posts
    6

    Re: Add working hours only to a date and time

    Hello,

    I tried the solution above and I kept getting answer "FALSE"

    I have attached my sheet, should you want to take a look at it please.

    Help needed
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    697

    Re: Add working hours only to a date and time

    Click F2 and see the linked cells in this formula.

    =IF(AND(WEEKDAY(A2)>1,WEEKDAY(A2)<7,HOUR(B2)>=9,HOUR(B2)<17),B2+TIME(HOUR(B2)+9,MINUTE(B2),SECOND(B2)))

    You have pasted the above formula in C1 instead of C2.

  5. #5
    Registered User
    Join Date
    10-01-2015
    Location
    Lagos
    MS-Off Ver
    2010
    Posts
    6

    Re: Add working hours only to a date and time

    Hello,

    Thank you for your response. I have made the changes, however the result remains same

+ 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