Help with Question on formula - getting unparsable - eyes are crossed

✭✭✭✭

Hi, I took my formula which worked in excel and have tried to reproduce it in smartsheet and I am getting an unparsable, I am going cross-eyed trying to figure out what I am doing wrong. Here is the formula if someone can help me figure it out. thank you - Amy

=IF(AND(ISTEXT(ExpirationDate1), Datefirst1 = "", Datesecond1 = ""), "N/A", IF(Datesecond1 <> "", Datesecond1 + 14), IF(Datefirst1 <> "", Datefirst1 + 14, DATE(YEAR(ExpirationDate1), MONTH(ExpirationDate1) - 1, DAY(ExpirationDate1)))))

• ✭✭✭✭✭

A couple of suggestions: first, I think there is an extra parenthesis (see below); second, I'd make sure there are no invalid dates in any of your columns.

`=IF(`

`AND(ISTEXT(ExpirationDate1), Datefirst1 = "", Datesecond1 = ""),`

` "N/A", `

`IF(`

`Datesecond1 <> "", `

`Datesecond1 + 14),  <---------- Remove this parenthesis`

`IF(`

`Datefirst1 <> "", `

`Datefirst1 + 14, `

`DATE(YEAR(ExpirationDate1), MONTH(ExpirationDate1) - 1, DAY(ExpirationDate1)))))`

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!