If Then rule with dates help

Closed
Valkrie - Sep 18, 2015 at 04:59 PM
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 - Sep 18, 2015 at 07:40 PM
Hello,

I'm trying to figure out a formula to calculate adding 84 days to an original date. However, if the calculated date does not fall on a Sunday, to add those days until it does. So for example, if you add 84 days to today's date, it is 12/11/2015, but it falls on a Friday. How can I add the If rule to have it add the 2 days to make it Sunday?

Thanks!

1 response

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Sep 18, 2015 at 07:40 PM
Valkrie, Good evening.

Suppose your date is at A1.

B1 -->
=IF(WEEKDAY(A1+84,2)=7,A1+84;A1+84+7-WEEKDAY(A1+84,2))


Is that what you're looking for?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
0