+ Reply to Thread
Results 1 to 9 of 9

Seeking Formula to exclude Weekends

  1. #1
    Registered User
    Join Date
    09-13-2019
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    22

    Seeking Formula to exclude Weekends

    Good Morning,

    I am seeking to amend the formula found under column "N2" of the attached Mock Up sheet to include only Working days (Monday to Friday) and also exclude Public Holidays listed under the sheet "Public Holidays".

    Thanks for your help!!

    Regards,

    M
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Seeking Formula to exclude Weekends

    See if this does what you are expecting:

    =WORKDAY.INTL(H2,(H2+CHOOSE(MATCH($D2,{"MB","LE","SUMO"},0),21,30,30)-H2),1,PublicHolidays!$B$2:$B$15)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-13-2019
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Seeking Formula to exclude Weekends

    Hi Ali,

    That is almost perfect, Thank you! I've only noticed the following issue:

    For e.g. as shown below, the breach date should fall on the 17th of April, on the 5th working day (I've changed all SLAs to 5 working days to make it easier to follow), however the breach date is falling on the 20th instead


    MockUpExcel.PNG

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Seeking Formula to exclude Weekends

    Why?

    There is no option in your part of the formula for five working days:

    CHOOSE(MATCH($D3,{"MB","LE","SUMO"},0),21,30,30)

    What have you NOT told us?

    If you have changed things, provide a new sample workbook.
    Last edited by AliGW; 04-03-2020 at 05:03 AM.

  5. #5
    Registered User
    Join Date
    09-13-2019
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Seeking Formula to exclude Weekends

    Hi Ali,

    My apologies...I thought that part of the formula could be altered without it having an effect on the Due Date Calculation, as it would always exclude Public Holidays and Weekends. Basically, the Due Date will be moved sometime in the near future according to latest regulatory requirements which is why I was testing this out.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Seeking Formula to exclude Weekends

    OK, well you'll need to attach an updated workbook if you need any further help.

  7. #7
    Registered User
    Join Date
    09-13-2019
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Seeking Formula to exclude Weekends

    Hi Ali,

    I've attached the excel sheet for your perusal
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,911

    Re: Seeking Formula to exclude Weekends

    Try:

    =WORKDAY.INTL(H2-1,CHOOSE(MATCH($D2,{"MB","LE","SUMO"},0),5,5,5),1,PublicHolidays!$B$2:$B$15)

  9. #9
    Registered User
    Join Date
    09-13-2019
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Seeking Formula to exclude Weekends

    Hi Phuocam,

    This works perfectly fine on normal Excel, however I am receiving a #VALUE! Error when I am trying to transfer the formula to Excel Online

    Attachment 670872

    Is there any work around for this ?

    Thank you!

+ 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] Excel Date formula exclude weekends
    By mkostin48 in forum Excel General
    Replies: 4
    Last Post: 03-22-2017, 12:55 PM
  2. Exclude Weekends in formula
    By linganit in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-12-2016, 01:06 PM
  3. [SOLVED] Formula to Exclude Holiday but not weekends
    By [email protected] in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-03-2015, 12:35 PM
  4. Formula to Exclude weekends ( Saturday and Sunday )
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-21-2014, 04:24 AM
  5. [SOLVED] seeking formula to exclude non working hours
    By jdgreen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-14-2013, 05:19 PM
  6. Exclude weekends and holidays from a formula.
    By Stevey in forum Excel General
    Replies: 5
    Last Post: 08-28-2009, 06:55 PM
  7. Formula to exclude weekends
    By bton24 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2006, 06:00 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