How to Copy Summary Task Values to Subtasks Using VBA in Microsoft Project
Question details
The user needs to copy custom field values from a summary task down to its subtasks in Microsoft Project.

- Product
- Microsoft Project
- Device & OS
- not provided
- Scenario
- Managing complex project schedules where subtasks need to inherit custom field data from their parent summary tasks.
- Observed behavior
- Custom field formulas in Microsoft Project cannot natively reference or retrieve values from a parent summary task, requiring a VBA workaround.
Ensure that you have enabled Developer tools and macros in Microsoft Project, and back up your project file before running any new VBA scripts.
Use a VBA Macro to Copy Summary Task Values
Run a custom VBA script to loop through project tasks and copy the parent summary task's value into the subtasks.
Because Microsoft Project custom field formulas cannot directly pull data from another task (like an outline parent or summary task), a VBA macro is the most effective way to automate this cross-task lookup.
The script will iterate through all tasks, identify those that are not summary tasks, and copy the specified text field from the parent task to the subtask.
Press ALT + F11 in Microsoft Project to open the Visual Basic for Applications (VBA) editor.
From the top menu, click Insert and select Module to create a blank script window.
Copy and paste the following code into the module window: Sub DwgID_Flowdown() Dim t As Task For Each t In ActiveProject.Tasks If Not t Is Nothing Then If t.Summary = False Then t.Text10 = t.OutlineParent.Text1 End If End If Next t End Sub.
Close the VBA editor and return to your project. Press ALT + F8 to open the Macro dialog box, select 'DwgID_Flowdown', and click Run to execute the script.

Manage Project Tasks Effortlessly with WPS Office
While Microsoft Project requires complex VBA scripts for advanced task roll-downs, WPS Spreadsheet offers an intuitive, free alternative for managing project trackers. With high compatibility with Microsoft formats and simple formula handling, it is perfect for streamlined task and project management without coding.
- 1. Download and Install: Download WPS Office for free from the official website and complete the quick installation process.
- 2. Open WPS Spreadsheet: Launch WPS Spreadsheet and select one of the built-in, free project management templates.
- 3. Track Project Tasks: Use simple hierarchical columns and standard functions like VLOOKUP to track summary tasks and subtasks effortlessly.

Frequently Asked Questions
Why can't I use a standard formula to pull summary task data into a subtask in MS Project?
Microsoft Project custom field formulas are calculated on a per-task basis and do not have a built-in function to reference relative hierarchical data, such as an outline parent's fields. This limitation requires a VBA macro to bridge the gap.
How do I run the VBA macro automatically when the project opens?
You can rename your macro to 'Project_Open()' and place it within the 'ThisProject' module in the VBA editor to have it execute automatically whenever the project file is opened.
Will this macro overwrite existing data in my subtask custom fields?
Yes, the macro will replace whatever is currently in the target custom field (e.g., Text10) with the value from the parent summary task. Ensure that this field is dedicated to this inherited data before running the script.




