If Then rule with dates help

Closed
Report
-
Posts
1947
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
November 11, 2021
-
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 reply

Posts
1947
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
November 11, 2021
147
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