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
-
@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
-
@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.
-
Oh my word...no wonder I was stuck! I never would have thought to look at that. Thank you so much!!
-
No problem, that was a head scratcher lol.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!