Nested IF with calculations - Unparseable Error

Hi!

I am trying to clean up a leave tracking Smartsheet and am just having the hardest time getting my nested IF formula to work. I have been through countless articles in Community and still no luck. The goal is the add the correct amount of days, depending on the type of leave, to then return the date at which that type of leave will exhaust.

This is my most recent version of the formula:

=IF([Type of Leave]@row = “FMLA - Self”, [Leave Start Date]@row + 84, IF([Type of Leave]@row = “FMLA - Family Member”, [Leave Start Date]@row + 84, IF([Type of Leave]@row = “Personal”, [Leave Start Date]@row + 30, IF([Type of Leave]@row = “Medical - not FMLA eligible”, [Leave Start Date]@row + 56))))

Any help is greatly appreciated!

Best Answer

  • Samuel Mueller
    Samuel Mueller Overachievers
    edited 02/06/23 Answer ✓

    @KL Jones this is going to sound crazy, but the type of quotes you had in there were wrong. I think it is a character thing. Your formula is correct. Try to copy and paste this into your cell

    =IF([Type of Leave]@row = "FMLA - Self", [Leave Start Date]@row + 84, IF([Type of Leave]@row = "FMLA - Family Member", [Leave Start Date]@row + 84, IF([Type of Leave]@row = "Personal", [Leave Start Date]@row + 30, IF([Type of Leave]@row = "Medical - not FMLA eligible", [Leave Start Date]@row + 56))))

    notice how my quotes are straight up and down, and yours are at an angle. I don't know why but changing those fixed it.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!