Showing parallel tasks in Microsoft Project

Whilst working in Microsoft Project, I often want to know what tasks are running in parallel to one another. I’ve never found how to do this using inbuilt functions so I wrote a Macro to do it for me.

To use it, add the Code to a Module, create a button on the Interface for the new macro, select 1 or more tasks you want to analyse and click the button.

The macro will create (or update) a new filter called “Parallel Tasks”, the filter will bet set to only show tasks which are active at the same time as any of the selected tasks.

You can show the tasks which were hidden by the macro by resetting the Filter.

Sub FilterBetween()
    OutlineShowAllTasks
 
    Dim filterName As String
    Dim fromDate As Date
    Dim toDate As Date
 
    filterName = "Parallel Tasks"
 
    FilterEdit Name:=filterName, TaskFilter:=True, Create:=True, _
           OverwriteExisting:=True, FieldName:="ID", _
           Test:="equals", Value:=1, Operation:="or", _
           ShowInMenu:=False, ShowSummaryTasks:=True
 
    Dim t As Task
    For Each t In ActiveSelection.Tasks
 
        FilterEdit Name:=filterName, TaskFilter:=True, Create:=False, _
                Parenthesis:=True, OverwriteExisting:=False, NewFieldName:="Finish", _
                Test:="is greater than or equal to", Value:=t.Start, Operation:="or", _
                ShowInMenu:=False, ShowSummaryTasks:=True
        FilterEdit Name:=filterName, TaskFilter:=True, Create:=False, _
                OverwriteExisting:=False, NewFieldName:="Finish", _
                Test:="is less than or equal to", Value:=t.Finish, _
                ShowInMenu:=False, ShowSummaryTasks:=True
 
        FilterEdit Name:=filterName, TaskFilter:=True, Create:=False, _
                Parenthesis:=True, OverwriteExisting:=False, NewFieldName:="Start", _
                Test:="is less than or equal to", Value:=t.Finish, Operation:="or", _
                ShowInMenu:=False, ShowSummaryTasks:=True
        FilterEdit Name:=filterName, TaskFilter:=True, Create:=False, _
                OverwriteExisting:=False, NewFieldName:="Finish", _
                Test:="is greater than or equal to", Value:=t.Finish, _
                ShowInMenu:=False, ShowSummaryTasks:=True
 
        FilterEdit Name:=filterName, TaskFilter:=True, Create:=False, _
                Parenthesis:=True, OverwriteExisting:=False, NewFieldName:="Start", _
                Test:="is greater than or equal to", Value:=t.Start, Operation:="or", _
                ShowInMenu:=False, ShowSummaryTasks:=True
        FilterEdit Name:=filterName, TaskFilter:=True, Create:=False, _
                OverwriteExisting:=False, NewFieldName:="Finish", _
                Test:="is less than or equal to", Value:=t.Finish, _
                ShowInMenu:=False, ShowSummaryTasks:=True
 
    Next t
 
    FilterApply Name:=filterName
End Sub

Leave a Reply