Forum Discussion
JenAllen932
Aug 29, 2023Copper Contributor
Excel formula help
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...
- Aug 30, 2023
Take a good look at the formula:
We subtract the number of days minus one from the date, then apply WORKDAY with -1 as argument.
JenAllen932
Aug 29, 2023Copper Contributor
HansVogelaar 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
HansVogelaar
Aug 30, 2023MVP
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.
- JenAllen932Aug 30, 2023Copper ContributorAbsolutely. I have a variation of dates as well as number of days. So an example of another cell would be 9/5 minus 5 days. Output should be 8/31 but that formula displays 8/30
- HansVogelaarAug 30, 2023MVP
Take a good look at the formula:
We subtract the number of days minus one from the date, then apply WORKDAY with -1 as argument.
- JenAllen932Aug 30, 2023Copper ContributorThis is perfect. I cannot thank you enough