Suppose we have 2 Week columns and we want the second Week column's value to be 4 weeks after the first Week column.

1: {Week2}=IF(ISEMPTY({Week1}),CLEAR())

2: {Week2}=IF(NOTEMPTY({Week1}),ADDDAYS({Week1},28))

For this, we use the simplest version of the IF function, i.e. the one that takes 2 parameters, a condition and the result we want if the condition is met. If the condition is not met, there is no outcome.

IF(Condition,Result)

**In Line 1,** we look for the value of Week1. If it is empty, we clear the Week2 column. Our condition is "Week1 is empty" which translates into:

ISEMPTY({Week1})

To clear a column, we use the CLEAR function (more on this at ).

Hence our first line of code:

1: {Week2}=IF(ISEMPTY({Week1}),CLEAR())

**In Line 2**, we take care of the opposite case: if Week1 is NOT empty.
Our condition is now:

NOTEMPTY({Week1})

In this case, our desired outcome is to add 4 weeks or 28 days to Week1.

To accomplish this, we use the ADDDAYS function, which accepts two parameters: the number of days we wish to add and the date/week/timeline value to which we want to add days.

ADDDAYS(28,{Week1})

That's how we came up with line 2:

2: {Week2}=IF(NOTEMPTY({Week1}),ADDDAYS(28,{Week1})

One of the great features of the *Advanced Formula Booster* is that it allows you to create multi-line formulas and we always try to take advantage of it
to write simpler formulas. But if you want a more concise syntax, use the 3rd parameter of the IF function. Please refer to if you are not familiar with it.

1: {Week2}=IF(ISEMPTY({Week1}),CLEAR(),ADDDAYS(28,{Week1}))