Documente Academic
Documente Profesional
Documente Cultură
10/27/2007
John O. McClain
Johnson Graduate School of Management
Cornell University
Ithaca NY 14853
This is a very simple program, intended for teaching purposes. You are welcome to use it in any manner,
and change it as you see fit. This model comes without any guarantee whatsoever, and is distributed free
of charge.
The calculations are done by a Macro. Before running the macro, first enter the data on a new
worksheet according to the instructions below. Then run the macro using the following menu options:
Excel 2003: Tools, Macro, Macros, CPM, Run
Excel 2007: View Tab, Macros, CPM, Run
Note: If the macro does not appear, or does not work, or if you get a message to the effect that "the
macros have been disabled", you need to "Enable Macros". For instructions, click on the link below:
Help with macro security
INPUT Data: Enter the data on any sheet as follows (see the Example sheet):
The top row is for titles.
Column A must have activity names. A title for this column should appear at the top.
Column B must have activity times (durations). The time units do not matter, but must be the same for all
activities.
Column C and subsequent columns must contain the predecessor activities, one predecessor per cell. Be
careful that the name of the predecessors are exactly the same as the names you used in the first
column.
MODEL: The CPM calculations of Earliest Start (ES), Earliest Finish (EF), Latest Start (LS), Latest Finish
(LF) and Slack (sometimes called Float) will appear on the sheet on which the data reside.
The model also produces input cells, in which you may put both a start time for the project and a deadline
for project completion.
DIAGRAM: A Gantt Chart is produced, showing the activities starting at their Earliest Start times. Each
activity is represented by a bar with length proportional to its duration. However, the predecessor
relationships, usually shown as arrows in a CPM diagram, are not included. Instead, each activity's label, on
the left of the chart, includes a list of all of its Successor activities.
COMPATIBILITY WITH @RISK: The CPM Macro puts formulas into the Excel Spreadsheet rather than
just numbers. Therefore, after running the macro, you may use @RISK to simulate uncertain activity times.
To do this requires that you have @RISK installed on your computer.
Replace the Activity times with @RISK Distribution Functions such as =RiskUniform(1,3).
Indicate as Output any cells for which you want a report. I suggest the cells containing Earliest Project
Completion Time and all of the Slack values.
The @RISK simulation will then tell you the mean project completion time, along with a range of
completion times that happened in the simulation. You may also view a histogram.
@RISK will report the same statistics for the Slack values. The histogram for a slack will tell you what
percentage of the time a given activity had Slack=0, and hence was on the critical path.
Activities
A
B
C
D
E
F
G
Time
2
4
3
5
3
5
2
Predecessors
A
B
C
C
E
Ta s k s a n d t h e ir S u c c e s s o r s
0
19
19
0
Activities Sequence
A-->C,E
1
B-->D,F
2
C-->E,F,G
4
D-->C
3
E-->G
5
F-->G
6
G
7
10
12
14
16
18
ate a solution,
acro, Macros, CPM, Run.
ab, then Macros, CPM, Run.
Slac
k
T
ask
s
16
18
20
274108639.xls, Warning, p. 4 of 7
274108639.xls, Warning, p. 5 of 7
D. Click Disable all macros with notification
E. Exit from Excel. Closing the file is not enough. On the menu bar, select File, and then Exit.
F. Open this file again and follow the instructions in STEP 1 to enable the macros.
For Excel 2003,
A.
B.
C.
D.
On the menu bar at the top of this page, select Tools, then Macro, then Security.
On the Security Level tab, select Medium and click OK.
Then exit from Excel. Closing the file is not enough. On the menu bar, select File, and then Exit.
Open this file again and follow the instructions in STEP 1 to enable the macros.
274108639.xls, Warning, p. 6 of 7
274108639.xls, Warning, p. 7 of 7