Forum Discussion
Possoto_Malome1
Oct 16, 2026Copper Contributor
Ms project
Hello MS project iif & switch formulas are not working please assist. I have tried a few colleagues same issue. When using IIf funtion it always returns a syntax error. Projdatediff works alright...
Kidd_Ip
Oct 17, 2026MVP
Microsoft Project does support IIf and Switch formulas in custom fields, but syntax errors usually occur if the formula is placed in the wrong field type or if quotation marks and separators are mismatched. The key is to ensure you are using these functions in a custom field formula (via Project > Custom Fields > Formula) and that the field type matches the return value (Text, Number, Flag, etc.).
https://support.microsoft.com/en-au/project/project-functions-for-custom-fields-in-project-desktop
Possoto_Malome1
Oct 21, 2026Copper Contributor
It highlights ProjDateDiff, which is correct