+ Reply to Thread
Results 1 to 3 of 3

Formula for SLA by excluding non-business hours, weekends (Fri & Sat) & Holiday

  1. #1
    Registered User
    Join Date
    02-27-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    2

    Formula for SLA by excluding non-business hours, weekends (Fri & Sat) & Holiday

    Hi Everyone,

    I have a data of Incidents with Start date with time, End time with time.

    Start time: 7/1/15 10:30 AM in C2 cell

    End time: 7/9/15 5:33 PM in D2 cell

    Holidays data in H2:H10.

    Formula which I am using calculate SLA is

    =(NETWORKDAYS(C2,D2,H$2:H$10)-1)*("18:00"-"09:00")+IF(NETWORKDAYS(D2,D2,H$2:H$10),MEDIAN(MOD(D2,1),"18:00","09:00"),"18:00")-MEDIAN(NETWORKDAYS(C2,C2,H$2:H$10)*MOD(C2,1),"18:00","09:00")

    As the above formula consider Saturday & Sundays as weekends so the results are not ok for my case.
    In my case I need to consider Friday & Saturdays as weekends. Pls suggest the correct formula.

    Thanks,
    Dhiraj

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

    Re: Formula for SLA by excluding non-business hours, weekends (Fri & Sat) & Holiday

    Hello Dhiraj, welcome to Excel Forum

    If you use NETWORKDAYS.INTL function in place of NETWORKDAYS then you can change the weekend to suit - 7 is the code for Friday/Saturday weekends

    =(NETWORKDAYS.INTL(C2,D2,7,H$2:H$10)-1)*("18:00"-"09:00")+IF(NETWORKDAYS.INTL(D2,D2,7,H$2:H$10),MEDIAN(MOD(D2,1),"18:00","09:00"),"18:00")-MEDIAN(NETWORKDAYS.INTL(C2,C2,7,H$2:H$10)*MOD(C2,1),"18:00","09:00")
    Audere est facere

  3. #3
    Registered User
    Join Date
    02-27-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    2

    Re: Formula for SLA by excluding non-business hours, weekends (Fri & Sat) & Holiday

    Thanks a lot daddylonglegs. This is working.

    Regards,
    Dhiraj

+ 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. Replies: 9
    Last Post: 07-04-2016, 11:42 PM
  2. [SOLVED] Counting working days excluding holiday and weekends
    By thollander in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-20-2014, 11:28 AM
  3. mark as business hours excluding weekends
    By bunkum in forum Excel General
    Replies: 12
    Last Post: 06-17-2013, 11:53 PM
  4. Replies: 4
    Last Post: 04-28-2010, 04:25 PM
  5. Replies: 3
    Last Post: 03-31-2008, 01:27 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