Use an IIf Formula for a Custom Finish Date Field in Microsoft Project
Question details
Create a custom field that displays a task's finish date when its deliverable flag is Yes and NA when it is No.

- Product
- Microsoft Project
- Device & OS
- not provided
- Scenario
- A project plan uses a deliverable flag to identify tasks whose finish dates should be displayed in a custom column.
- Observed behavior
- The desired column shows the formatted finish date for flagged tasks and NA for unflagged tasks.
Open the project and confirm that Deliverable Flag is the name of the task flag field. Choose an unused task Text field for the result, since the formula returns a formatted date or the text NA.
Create a custom text field with an IIf formula
Use this method to display a formatted finish date or NA based on a Yes/No deliverable flag.
In Microsoft Project, open the Project tab and select Custom Fields. Choose Task and select Text as the field type.
Select an unused field, such as Text1, and use Rename if you want to give the column a descriptive name.
Select Formula and enter IIf([Deliverable Flag],Format([Finish],"m/d/yyyy"),"NA"). Confirm the formula and close the Custom Fields dialog.
In a task view, right-click a column heading, select Insert Column, and choose the custom text field. Check tasks with the flag set to Yes and No.

Compare a text-based deliverable field with Yes
Use an explicit comparison if the deliverable indicator is a text field rather than a Boolean flag.
Work with project reports in WPS Office
WPS Office is a free, lightweight alternative for editing project reports and spreadsheets with a familiar interface. Its Microsoft Office format compatibility helps you move existing documents and spreadsheets into your workflow, though it does not fix Microsoft Project formulas or replace Project scheduling.

Frequently Asked Questions
Why should I use a Text field instead of a Finish field?
The formula returns a formatted date as text or the literal text NA. Select a task Text field under Project > Custom Fields for this display.
How do I change the displayed date format?
Open Project > Custom Fields, select the result field, and choose Formula. Change the format string in Format([Finish],"m/d/yyyy") to your preferred date format.
What if Deliverable Flag is stored as text?
In the Formula dialog, compare the text field explicitly with "Yes", as in IIf([Deliverable Flag]="Yes",Format([Finish],"m/d/yyyy"),"NA"). Use the actual field name in the formula.
How do I show the custom field in my task view?
Right-click a column heading in a task view, select Insert Column, and choose the Text field you configured or its renamed label.




