Contains the macro for running PERT Analysis in Microsoft Project 2019 as well as in Microsoft Project 2016
- Make sure to check out Setting up the macro below if you haven't already set this up.
- When you first open a project, hit the button to add the necessary Fields (adds the "Optimistic Duration","Most Likely Duration","Pessimistic Duration","Optimistic Weight","Most Likely Weight","Pessimistic Weight","PERT State") beside the "Duration" Field.
- While entering data, by default the Macro will consider only the weights of the first task as the weights for all tasks, so you can safely set the other weights (weights from task 2 onwards) to 0.
- Make sure that the sum of the "Optimistic Weight","Most Likely Weight","Pessimistic Weight" Fields are equal to 6.
- After you have entered all the data into the Entry Table, hit the button again and it will analyze PERT and give the output Duration in the "Duration" field.
Raise an issue if you face any problems.
Sample Project can be found here
BE SURE TO ENABLE MACROS WHILE OPENING A PROJECT WITH PERT ANALYSIS REQUIREMENTS IF ASKED, OTHERWISE THE MACRO MIGHT NOW WORK
Step 1. Open a New Project inside MS Project 2019
Step 2. Go to View > Macros (Dropdown) > Visual Basic
Step 3. Select ThisProject(Global.MPT) From Microsoft Project Objects under ProjectGlobal(Global.MPT) (We are using global so that we can use this macro on all future projects without having to readd to them)
Step 4. Paste the code from the PERTmacro.vba file here (Raw can be found here) into the codebox that opens (append to the end if some code is already present there)
if no codebox opens, then right click on ThisProject(Global.MPT) and select View Code
Step 5. Hit Save from either the toolbox or Going to File > Save Global.MPT or just hit Ctrl + S And close the Microsoft Visual Basic for Applications window
Step 1. Click on Customize Quick Access Toolbar (Top Left Corner of Project Window)
Step 2. Go to More Commands...
Step 3. Select Macros from the Choose Commands from dropdown
Step 4. Select PERT and click on Add >> (Make sure the Customize Quick Access Toolbar dropdown is selected to For all documents)
Step 5. You Should have PERT into the Quick Access Toolbar For all documents (you can rearrange using the buttons to the side)
Step 6. Hit OK
Step 7. Now you have a button in the Quick Access Toolbar (on hovering the tooltip says PERT)
Used a bit of code snippet from This StackOverflow answer by dbmitch
Based on This Microsoft Blog