+ Reply to Thread
Results 1 to 3 of 3

Start Date + 8 Days but Can't End on a Weekend/Holiday

  1. #1
    Registered User
    Join Date
    07-21-2021
    Location
    Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Start Date + 8 Days but Can't End on a Weekend/Holiday

    I'm looking for help with creating a formula that will take a certain date, add 8 days (including weekends and holidays), but the end date cannot end on a weekend or holiday. I can't use workday because it will exclude weekends and holidays in the +8 day portion of the formula. I've come up with this so far:

    =IF(ISNUMBER(MATCH(IF(OR(WEEKDAY(N347+8,2)=6,WEEKDAY(N347+8,2)=7),(N347+8+WEEKDAY(N347+3)),N347+8),'Data Containing B9'!$X$33:$X$50,0)),IF(OR(WEEKDAY(N347+8,2)=6,WEEKDAY(N347+8,2)=7),(N347+8+WEEKDAY(N347+3)),N347+8)+1,IF(OR(WEEKDAY(N347+8,2)=6,WEEKDAY(N347+8,2)=7),(N347+8+WEEKDAY(N347+3)),N347+8))

    This formula takes the start date and adds 8 days, but if the end date is a Saturday or Sunday it will push it to the Monday, or if the end date is a holiday or a production shut down day (as per a static list I'm referencing), it will add 1 day. The problem occurs when 2 shut down days occur in a row. For example, if my start date is 2021-07-21, +8 days lands me on 2021-07-29, which is a shut down day. The formula will add 1 day to make the end date 2021-07-30; however, July 30th is also a shut down day.

    Any advice?

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Start Date + 8 Days but Can't End on a Weekend/Holiday

    something like

    =WORKDAY(N347+7,1,< holiday date range >)

    so you add 7 days to A1, then take next working day after that - taking into consideration any public holidays

  3. #3
    Registered User
    Join Date
    07-21-2021
    Location
    Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Start Date + 8 Days but Can't End on a Weekend/Holiday

    Wow so much easier than my brain was making it, thank you so much!

+ 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] I need to set a start date and an end date to use a holiday days.
    By LuciferUntamed in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-22-2020, 02:33 AM
  2. [SOLVED] Formula to add days with holiday & weekend
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2019, 04:29 AM
  3. [SOLVED] Calculate Calendar Days Ahead, but if weekend or holiday result the earliest weekday
    By Alphabex in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-28-2018, 01:25 PM
  4. [SOLVED] How many WEEKEND DAYS & HOLIDAY DAYS between 2 dates in September
    By leovfx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-12-2017, 07:32 PM
  5. Networkdays with holiday - start date falls on a holiday
    By skexcelforum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2014, 01:47 AM
  6. Replies: 24
    Last Post: 10-08-2014, 10:31 AM
  7. filter out weekend\holiday days from a pivot table
    By nmss18 in forum Excel General
    Replies: 3
    Last Post: 06-01-2011, 03:10 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