+ Reply to Thread
Results 1 to 10 of 10

need function to find the SLA between days and hours excluding non business hours

  1. #1
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    163

    need function to find the SLA between days and hours excluding non business hours

    Hi Team,

    I have tried using the formulas from other posts but it is not working, since I am getting results as 00:00:00. I need to calculate SLA or TAT by excluding non business hours. Kindly help me. attached sample file for your reference. Refer column "O" "P" and "R".

    working hours: 07 AM to 8 PM.
    working days - Monday to Friday.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: need function to find the SLA between days and hours excluding non business hours

    Perhaps if you gave some expected answers, we would be able to help you.

    https://exceljet.net/formula/get-wor...ates-and-times gives you the method, but given all your times are outside of your working hours the hours with your working hours are 0. It may be the formula you are using is correct!


    Approved At Ordered
    29/04/2021 22:07 29/04/2021 22:42


    hours within working hours are 0! and the same for every other row!

  3. #3
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    163

    Re: need function to find the SLA between days and hours excluding non business hours

    @davsth : Thank you very much for checking.

    if it is approved and ordered date are outside of working hours. I need to include the formula in the same formula string to calculate ordered - approved at hours. Kindly help me.

    For example here I need the difference between below given timings.

    Approved At Ordered
    29/04/2021 22:07 29/04/2021 22:42

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: need function to find the SLA between days and hours excluding non business hours

    You need to give expected answers for various scenarios. You asked to exclude non business hours originally!

    What would
    29/04/2021 22:07 30/04/2021 22:42 be?
    29/04/2021 6:00 29/04/2021 8:00 be?
    29/04/2021 16:00 29/04/2021 22:00 be?
    29/04/2021 22:07 29/04/2021 22:42 is 0:35?


    It is hard to write a formula if we do not know what the answers are

  5. #5
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    163

    Re: need function to find the SLA between days and hours excluding non business hours

    Below are my answers.

    29/04/2021 22:07 30/04/2021 22:42 be? - 13 hrs (since it should calculate the business hours for the 30/04/2021)
    29/04/2021 6:00 29/04/2021 8:00 be? - 1 hr (since 6:00 to 07:00 is non business hours and the business hours starts from 07:00)
    29/04/2021 16:00 29/04/2021 22:00 be? - 4hrs (since post 20:00 is non business hours calculated only from 16:00 to 20:00)
    29/04/2021 22:07 29/04/2021 22:42 is 0:35? - yes, if either of the column falls under business hours then the hours should calculate excluding non business hours and if both the columns falls under non business hours, just calculate the difference between both the columns.

    Also, I have noticed that the Row 2 in the attached file is having the date and time under business hours but it is still showing 00:00:00.

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: need function to find the SLA between days and hours excluding non business hours

    The first of may was a saturday so 0 is the correct answer!
    day so 0 is the correct answer
    try(if(yourformula=0,p2-o2,yourformula)

  7. #7
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    163

    Re: need function to find the SLA between days and hours excluding non business hours

    Thank you very much for your suggestions.

    I did tried the way you have given but I am still getting 0 values for the below.

    5/1/2021 14:30 5/1/2021 15:43 (getting only ##### symbols)
    5/3/2021 23:44 5/4/2021 0:34 (getting 0 value)
    5/3/2021 23:01 5/4/2021 1:34 (getting 0 value)
    Kindly check and assist.

  8. #8
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    163

    Re: need function to find the SLA between days and hours excluding non business hours

    @davsth - Kindly help me on the request above.

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: need function to find the SLA between days and hours excluding non business hours

    Did you even make the change I suggested in post 6? it works with the last 2 the ### are as a rounding error

    try if(round(yourformula,6)=0,p2-o2,yourformula)

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    06-12-2013
    Location
    india
    MS-Off Ver
    Office 365
    Posts
    163

    Re: need function to find the SLA between days and hours excluding non business hours

    @davsth: Thank you very much, it works as per my requirement.

+ 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. Formula to calculate SLA by excluding non-business hours
    By odevill in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-03-2020, 11:31 AM
  2. Replies: 3
    Last Post: 07-24-2018, 03:24 AM
  3. Converting Total Hours to Business Hours/Days
    By Fadooshy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-27-2015, 12:26 PM
  4. Replies: 2
    Last Post: 11-12-2014, 11:56 AM
  5. mark as business hours excluding weekends
    By bunkum in forum Excel General
    Replies: 12
    Last Post: 06-17-2013, 11:53 PM
  6. Replies: 1
    Last Post: 05-20-2012, 11:57 AM
  7. Replies: 0
    Last Post: 04-07-2011, 01:46 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