I currently have a formula for a 'due date' column that looks at another date column "DOD" and calculates if the status is 'probability' for that row it makes the 'due date' column "DOD" + 5 years, otherwise the 'due date' column is 8 months + 1 day from the "DOD" date column, adjusting for the next year if the 8 months + 1 day crosses into a new month. This is the formula:
=IF(Status@row = "Portability", DATE(YEAR(DOD@row ) + 5, MONTH(DOD@row ), DAY(DOD@row )), DATE(YEAR(DOD@row ) + INT((MONTH(DOD@row ) + 8) / 12), MOD(MONTH(DOD@row ) + 8, 12) + 1, DAY(DOD@row )))
I want to add a condition that if the final date after the calculation in the formula above is a Saturday or Sunday, the date adjusts to the preceding Friday. I have tried using the Smartsheet AI, Chat GPT, and a person who does a lot of work in SQL. These options have produced 10 different formulas that all have failed. I either get syntax errors or values in the date column saying INVALID#. Any suggestions?