How to Display Predecessor and Successor Task Names in MS Project
Question details
The user wants to display the actual names of predecessor and successor tasks instead of their numerical task IDs to create spreadsheet-friendly dependency reports.

- Product
- Microsoft Project
- Device & OS
- not provided
- Scenario
- Preparing a project report or exporting data where stakeholders need to see clear task names for dependencies rather than referencing numerical IDs.
- Observed behavior
- By default, Microsoft Project only displays task IDs in the Predecessors and Successors columns, which requires manual cross-referencing to understand task relationships.
Ensure you have saved a backup of your Project file before running any VBA macros, and verify that the Developer tab is enabled in your Microsoft Project ribbon.
Use a VBA Macro to Populate Custom Text Fields
Running a custom VBA macro is the most efficient way to extract predecessor and successor names and place them into custom text columns like Text2 and Text3.
Because a single task can have multiple predecessors and successors with varying dependency types and lag times, a macro can iterate through these relationships and compile the names into a single string.
This method preserves your original task relationships while providing a clear, text-based list that can easily be exported or presented in reports.
Go to File > Options > Customize Ribbon. Check the box for 'Developer' in the right pane and click OK.
Click the Developer tab on the ribbon, then click 'Visual Basic' to open the VBA editor.
In the VBA editor, right-click on your project in the Project Explorer pane, select 'Insert', and choose 'Module'.
Paste a VBA script designed to loop through each task (e.g., 'For Each t In ActiveProject.Tasks') and write the dependency names into designated custom fields, such as Task.Text2 for predecessors and Task.Text3 for successors.
Press F5 or click the 'Run' button in the toolbar. Return to your Project view and insert columns for Text2 and Text3 to view the generated names.

Export Data to a Spreadsheet and Use XLOOKUP
If your organization restricts VBA macros, you can export your task data to a spreadsheet application and use lookup formulas to match task IDs with their names.
Analyze Exported Project Data with WPS Office
While Microsoft Project manages complex scheduling, WPS Spreadsheet is a powerful, free alternative to Microsoft Excel for organizing, filtering, and reporting your exported dependency lists.
- 1. Export Project Data: Save your MS Project task list as an Excel (.xlsx) or CSV file.
- 2. Open in WPS Spreadsheet: Launch WPS Office, open Spreadsheet, and import your project data.
- 3. Format and Share: Use WPS Spreadsheet's lookup formulas to match task names and share the clean report with your team.

Frequently Asked Questions
Is there a built-in setting in MS Project to show task names instead of IDs?
No, Microsoft Project natively uses task IDs in the Predecessor and Successor columns to save space and manage data efficiently. Replacing them with names requires a workaround like a VBA macro or exporting the data.
What happens if a task has multiple predecessors?
When using a macro to generate task names, the script concatenates multiple task names into a single string. This can result in a very long list of text in the custom field, which might be harder to read than the original IDs.
Do the custom text fields update automatically if I change a dependency?
No, the text fields populated by the VBA macro are static text. If you add or remove predecessors or successors, you must run the macro again to refresh the custom text fields.
How do I fix a macro security error when running the VBA script?
If MS Project blocks your macro, navigate to File > Options > Trust Center > Trust Center Settings > Macro Settings. Adjust the setting to 'Enable all macros' temporarily, run the script, and then revert the setting for security.




