# Adding Days to a Date Based on a Condition

Options
✭✭✭✭✭✭

Hi

I've trawled the forum for previous questions but can't seem to see one similar to what I need. I have a date column that I want to auto calculate based on a condition within another column.

If [Corrective actions to be completed] = "Immediate" or "5 working days", take [Corrective action chaser 1] + 11 days, if [Corrective actions to be completed] = "10 working days", take [Corrective action chaser 1] + 7 days. If [Corrective actions to be completed] is blank, return blank in [Corrective actions chaser 2]

The formula I have used is shown in the screen shot above but, it just returns a blank rather than the chaser 1 date + 11 days date, which was the expected return.

@Paul Newcome I know you have been my formula guru just lately, I'm assuming there is something relatively simple I am missing?

TIA

Cheryl

Tags:

• ✭✭✭✭✭✭
Options

I've now answered my own question and worked it out. The formula is:

=IF(OR([Corrective actions to be completed]@row = "Immediately", [Corrective actions to be completed]@row = "5 working days"), [Corrective action chaser 1]@row + 11, [Corrective action chaser 1]@row + 7)

• ✭✭✭✭
Options

Try to get rid of the parenthesis in front of the second IF statement -it is a pink parenthesis. Also remember to get rid of the closing parenthesis that is a result of it.

• ✭✭✭✭✭✭
Options

Unfortunately by removing the pink parenthesis, I now get a #UNPARESABLE error

• ✭✭✭✭✭✭
Options

I've now answered my own question and worked it out. The formula is:

=IF(OR([Corrective actions to be completed]@row = "Immediately", [Corrective actions to be completed]@row = "5 working days"), [Corrective action chaser 1]@row + 11, [Corrective action chaser 1]@row + 7)

• ✭✭✭✭✭✭
Options

Glad you got it sorted! 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!