Sub FollowEarliestPredecessor() Dim t, p, earliest As Task Dim ps As Tasks Dim l As Long Dim tdeps As TaskDependencies Dim tdep As TaskDependency Set t = ActiveSelection.Tasks(1) 'Set lag to 0 to remove any previous lags Set tdeps = t.TaskDependencies For Each tdep In tdeps If tdep.To = t.ID Then tdep.lag = 0 End If Next tdep CalculateProject 'Find earliest predecessor Set ps = t.PredecessorTasks Set earliest = ps(1) For Each p In ps If p.Finish <= earliest.Finish Then Set earliest = p End If Next p 'Set lag so it covers the greatest task variance l = -Application.DateDifference(earliest.Finish, t.Start) 'Apply that lag to all predecessors except for the earliest For Each tdep In tdeps If tdep.To = t.ID And tdep.From <> earliest.ID Then tdep.lag = l End If Next tdep CalculateProject End Sub