Stuck on Nested IF statement.

Hello! Somewhat new to Smartsheet and having a small struggle with figuring out my syntax.

The below statement functions when "ordered" is selected, but if "Onsite" is selected nothing happens. I'm not getting an error of any kind. I can swap out "Ordered" with "Onsite" and it will work. I cant seem to get the second IF functioning.

=IF(Status@row = "ordered", DATE(YEAR([Order Date | Warranty Start Date]@row) + 1, MONTH([Order Date | Warranty Start Date]@row) + 7, DAY([Order Date | Warranty Start Date]@row, IF(Status@row = "Onsite", DATE(YEAR([Order Date | Warranty Start Date]@row) + 1, MONTH([Order Date | Warranty Start Date]@row) + 7, DAY([Order Date | Warranty Start Date]@row, ""))))))


Thank you!

Best Answer

  • Austin Smith
    Austin Smith ✭✭✭✭✭
    Answer ✓

    @Coen

    Try this:

    =IF(Status@row = "ordered", DATE(YEAR([Order Date | Warranty Start Date]@row) + 1, MONTH([Order Date | Warranty Start Date]@row) + 7, DAY([Order Date | Warranty Start Date]@row)), IF(Status@row = "Onsite", DATE(YEAR([Order Date | Warranty Start Date]@row) + 1, MONTH([Order Date | Warranty Start Date]@row) + 7, DAY([Order Date | Warranty Start Date]@row, "")), ""))

    I think you just had misplaced parentheses.

Answers

  • Austin Smith
    Austin Smith ✭✭✭✭✭
    Answer ✓

    @Coen

    Try this:

    =IF(Status@row = "ordered", DATE(YEAR([Order Date | Warranty Start Date]@row) + 1, MONTH([Order Date | Warranty Start Date]@row) + 7, DAY([Order Date | Warranty Start Date]@row)), IF(Status@row = "Onsite", DATE(YEAR([Order Date | Warranty Start Date]@row) + 1, MONTH([Order Date | Warranty Start Date]@row) + 7, DAY([Order Date | Warranty Start Date]@row, "")), ""))

    I think you just had misplaced parentheses.

  • Coen
    Coen ✭✭✭✭

    @Austin Smith Thank you! This did it!!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!