logo
search
Others

How to Display Predecessor and Successor Task Names in MS Project

Steve KSteve K Oct 10, 2026 870 views

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.

How to Display Predecessor and Successor Task Names in Microsoft Project
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.
Before you start

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.

Solution 1Recommended

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.

1
Enable the Developer Tab

Go to File > Options > Customize Ribbon. Check the box for 'Developer' in the right pane and click OK.

2
Open the Visual Basic Editor

Click the Developer tab on the ribbon, then click 'Visual Basic' to open the VBA editor.

3
Insert a New Module

In the VBA editor, right-click on your project in the Project Explorer pane, select 'Insert', and choose 'Module'.

4
Add the Macro Code

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.

5
Run the Macro

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.

Use a VBA Macro to Populate Custom Text Fields
Macro Limitations: Custom fields populated by a macro are static. If you change a task dependency later, you will need to re-run the macro to update the text fields.
Free Microsoft Office alternative

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. 1. Export Project Data: Save your MS Project task list as an Excel (.xlsx) or CSV file.
  2. 2. Open in WPS Spreadsheet: Launch WPS Office, open Spreadsheet, and import your project data.
  3. 3. Format and Share: Use WPS Spreadsheet's lookup formulas to match task names and share the clean report with your team.
Completely free and lightweight office suiteHigh compatibility with Microsoft Excel formats (.xlsx, .csv)Familiar user interface with zero learning curve for data manipulationPowerful built-in formulas for XLOOKUP and data formatting
microsoft office alternative - wps office

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.