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?
Bookmarks