# Calculated field for date columns, if date1 has a date use it, else if date2 has a date use it, else use date3

I am working on building a calculated field using 3 date columns on a list and I am having difficulties due to being 3 dates and If/Else. Basically it should calculate a date based on if date1 is not null add 90 days, else (if date 1 is null) use date 2 plus 90 days, else (if date 2 is null) use date3 plus 90 days.

This is what I have so far. I may be completely wrong. Any help is appreciated.

``````=IF((NOT(ISBLANK[DATE1]+90)),(NOT(ISBLANK[DATE2]+90)), [DATE3]+90)
``````

Use below formula for your calculated field:

``````=IF(ISBLANK([DATE1]), IF(ISBLANK([DATE2]), IF(ISBLANK([DATE3]), "", [DATE3]+90), [DATE2]+90), [DATE1]+90)
``````

Note:

1. Sometimes comma(`,`) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(`;`) instead of comma(`,`).

Official Documentations:

• Hi Ganesh, appreciate your help. I am still unable to make this work. I am working with SharePoint 2013 and still getting this error "The formula contains a syntax error or is not supported. I tried your example and adding two closing parenthesis to the end and both ways it failed. Any thoughts? Commented Mar 25, 2021 at 20:25
• What is the language/regional settings on your site? Can you please try replacing `, ` by `;` Commented Mar 26, 2021 at 3:42
• I did try the function with (;) instead of (,) and it didn't work. I have created other functions using (,) and they have worked so I'm sure commas work. Commented Mar 30, 2021 at 17:30