Changing State Based on Criteria.
Hi all,
I think I have some syntax incorrect in my code and hoping for some help.
Currently, I have a formula that sets the State of a task based on % Complete:
"=IF([% Complete]@row = 0, "Not Started", IF(AND([% Complete]@row > 0, [% Complete]@row < 1), "In Progress", IF([% Complete]@row = 1, "Complete")))"
I also have an At Risk flag set to the following:
"=IF(AND([End Date]@row < TODAY(), NOT([% Complete]@row = 1)), 1, 0)"
I'm trying to add an additional State to 'At Risk', if the flag is checked, but I'm getting an error when I try, so I assume there is an error in my formula:
"=IF([% Complete]@row = 0, "Not Started", IF(AND([% Complete]@row > 0, [% Complete]@row < 1), "In Progress", IF([% Complete]@row = 1, "Complete", IF[At Risk]@row = 1, "At Risk"))))"
I'm sure it's VERY close to being correct, but I'm not experienced enough to figure it out. Any help?
Best Answer

That should work for you. Nested IF statements work from left to right and stop on the first true value.
Answers

You are missing an opening parenthesis after the last IF.

Thanks Paul. I've done that and I no longer get the error, but it's not changing the State to At Risk if it is flagged. Should I move that part of the formula to the beginning? Could it being at the end make it a lower priority (since the task is marked as In Progress earlier in the formula, it won't take the At Risk part into account?).

That should work for you. Nested IF statements work from left to right and stop on the first true value.
Help Article Resources
Categories
Check out the Formula Handbook template!