Others

Calculate Finish-to-Start Relationships in Microsoft Project

Anum MushtaqAnum Mushtaq Nov 13, 2026 868 views

Question details

Calculate the percentage of project dependency relationships that are Finish-to-Start for a DCMA metric.

Calculate Finish-to-Start Relationships in Microsoft Project
Product
Microsoft Project
Device & OS
not provided
Scenario
A project schedule contains dependencies of different types, and the user needs a relationship-based percentage for the overall project.
Observed behavior
A task-level custom formula does not reliably count individual relationship types when a task has multiple predecessors.
Before you start

Open the schedule in the desktop version of Microsoft Project and confirm which relationships belong in your metric. The VBA example below is intended for a single, standalone project; check external links and master projects separately.

Solution 1Recommended

Count relationships with a Microsoft Project VBA macro

Use VBA to count individual dependencies and calculate the Finish-to-Start percentage without parsing predecessor strings.

The macro counts each dependency at its successor task, so you do not need to add predecessor and successor counts together. It includes the relationships accessible in the active project; verify its scope against your organization's DCMA reporting rules.

1
Open the VBA editor

In the desktop version of Microsoft Project, open the schedule and press Alt+F11. In the VBA editor, select Insert > Module.

2
Add the counting macro

Paste this code into the module: Sub CountFinishToStartLinks() Dim t As Task Dim link As TaskDependency Dim totalLinks As Long Dim fsLinks As Long For Each t In ActiveProject.Tasks If Not t Is Nothing Then For Each link In t.TaskDependencies If link.To.UniqueID = t.UniqueID Then totalLinks = totalLinks + 1 If link.Type = pjFinishToStart Then fsLinks = fsLinks + 1 End If End If Next link End If Next t If totalLinks = 0 Then MsgBox "No relationships found." Else MsgBox "Finish-to-Start: " & fsLinks & vbCrLf & _ "Total relationships: " & totalLinks & vbCrLf & _ "Percentage: " & Format(fsLinks / totalLinks, "0.00%") End If End Sub

3
Run and review the count

Return to Project, press Alt+F8, select CountFinishToStartLinks, and click Run. Review the Finish-to-Start count, total relationship count, and percentage in the message box.

Count relationships with a Microsoft Project VBA macro
Check the reporting scope: Macro security settings may prevent the code from running; use your organization's approved settings. For external links, inserted projects, or other special cases, reconcile the counts with the relationships included in your DCMA assessment.
Free Microsoft Office alternative

Review Dependency Calculations with WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface for reviewing a relationship list exported or prepared from Microsoft Project. Open compatible Excel files and continue spreadsheet work with minimal disruption; WPS does not calculate links inside Microsoft Project.

Count Finish-to-Start entries in a relationship table using spreadsheet formulasOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does the DCMA Finish-to-Start percentage count tasks or relationships?

It counts relationships: divide the number of Finish-to-Start links by the total number of links in the chosen reporting scope. A task with multiple predecessors can contribute multiple relationships.

Can I use a Project custom-field formula to count Finish-to-Start links?

A formula can flag some tasks whose Predecessors field does not contain SS, FF, or SF, but it does not reliably count every link in a complex predecessor string. Use a relationship-level VBA count or a normalized dependency list for the percentage.

Why does the macro count dependencies at the successor only?

A relationship connects a predecessor to a successor. Checking link.To against the current task counts the link at its successor rather than adding both ends of the same link.

What should I do if the macro reports no relationships?

Check that the intended schedule is the active project and that its tasks have dependency links. In Project, inspect the Predecessors column or the Task Information dialog for linked tasks, then run the macro again.