Aug 29 2023 02:07 PM
I am trying to find the best formula for the following situation. I want to take a date, subtract a certain number of days (will vary) and have the output only display Monday - Friday. If it lands on a Saturday or Sunday I want the date to default to the prior Friday. I’m currently using the workday formula but it’s counting business days. I want to count calendar days but not display weekends in my output. Example - date 9/6 minus 10 days - output would be 8/27 which is a Sunday so I would want it to display 8/25
Aug 29 2023 02:22 PM
Aug 29 2023 03:32 PM
@Hans Vogelaar this is great. Except it’s subtracting a day on all days even if it isn’t a weekend day. Is there a way to prevent that
Aug 30 2023 01:26 AM
the formula that I suggested returns the correct result in your example: 9/6 minus 10 days returns 8/25.
Can you provide some examples where the formula does not return the desired result, with an indication of what you expected? Thanks in advance.
Aug 30 2023 07:13 AM
Aug 30 2023 07:25 AM
SolutionTake a good look at the formula:
We subtract the number of days minus one from the date, then apply WORKDAY with -1 as argument.