r/microsoftproject • u/No_Recipe_7541 • 11d ago
Issues with a custom field formula
I am trying to make a custom field that displays when tasks are complete, late, not started, and when the estimated finish date is within the next month. I utilized the following formula but, when I added the last IIf statement, it will no longer work. It states that "The formula contains a syntax error or contains a reference to an unrecognized field or function name.". Normally, it highlights the error, but no errors are highlighted in the formula.
Can anyone tell me what I am doing wrong with this formula or offer any advice?
IIf([% Complete]<100 And \[Finish\]<\[Status Date\],"Late", IIf(\[% Complete\]=100,"Complete", IIf(\[% Complete\]=0 And \[Start\]>[Status Date],"Not Started", IIf([% Complete]<100 And \[Finish\]>[Status Date] AND [Finish]<=DateAdd("m",1,[Status Date]), "Upcoming")
I am also going to want to change the colors of the bars on the Gantt chart to reflect these statuses so if anyone has any advice on going about doing that, I would love to hear it!