Hello, my apologies if this problem has been solved in a previous post - I've tried searching this forum, but couldn't find an answer. Perhaps I wasn't searching correctly.
I am trying to calculate deadlines by subtracting (all calendar) days from a start date, but the deadline cannot fall on a weekend or statutory holiday. If the end date falls on a weekend or statutory holiday, the deadline is pushed back to the preceding (non-holiday, non-weekend) work day. For example, if the end date falls on a Saturday or Sunday, the deadline will be pushed to the previous Friday (as long as the Friday is not a stat holiday; if the Friday is a stat holiday, then deadline will be pushed back again to the day before - a Thursday). I have the holidays listed out in a table named "Holidays". I am not opposed to using multiple columns - whatever to make this work!
I've come across two formulas for subtracting dates that only work part of the time.
1. =WORKDAY(start_date + Days*,1,Holidays). *the Days value is always minus 1 of what you want to calculate. Example: calculating 5 days before a start date, cell B1 is "Days" and has a value of -6. =WORKDAY(start_date + B1,1,Holidays)
This one doesn't always work because if the end date falls on a weekend or holiday, the end date gets pushed forward to the next working day, rather than backwards to the preceding work day.
2. =WORKDAY.INTL(start_date,Days,1, Holidays)
This formula doesn't always work because it does not count weekends or holidays in the calculations, producing a date that is too early.
Appreciate any help!
I am trying to calculate deadlines by subtracting (all calendar) days from a start date, but the deadline cannot fall on a weekend or statutory holiday. If the end date falls on a weekend or statutory holiday, the deadline is pushed back to the preceding (non-holiday, non-weekend) work day. For example, if the end date falls on a Saturday or Sunday, the deadline will be pushed to the previous Friday (as long as the Friday is not a stat holiday; if the Friday is a stat holiday, then deadline will be pushed back again to the day before - a Thursday). I have the holidays listed out in a table named "Holidays". I am not opposed to using multiple columns - whatever to make this work!
I've come across two formulas for subtracting dates that only work part of the time.
1. =WORKDAY(start_date + Days*,1,Holidays). *the Days value is always minus 1 of what you want to calculate. Example: calculating 5 days before a start date, cell B1 is "Days" and has a value of -6. =WORKDAY(start_date + B1,1,Holidays)
This one doesn't always work because if the end date falls on a weekend or holiday, the end date gets pushed forward to the next working day, rather than backwards to the preceding work day.
2. =WORKDAY.INTL(start_date,Days,1, Holidays)
This formula doesn't always work because it does not count weekends or holidays in the calculations, producing a date that is too early.
Appreciate any help!