Você está na página 1de 20

Advanced Gantt Charts in Microsoft Excel.

Introduction

Gantt charts are useful tools in program management, which help to show graphically when tasks must start a finish, and which tasks are underway at any given time. Gantt charts help in scheduling of the many tasks in a program, and in identifying potential resource issues in the schedule. A simple Gantt chart is merely a floating chart, that is, a stacked bar chart in which the first series is formatted to be invisible. The second series of bar stacked on the first, but these bars appear to float in the middle of the chart, because the first series is format invisible. My article Gantt Charts in Microsoft Excel in Tech Trax e-zine describes this simple approach.

This example is more detailed, and therefore more complicated. There are two visible bars, so the floating bar show fraction complete and fraction incomplete. In addition, two line chart series are added to show milestone completed and not-yet-completed tasks. Excel will not allow an XY series to be added to a Bar-Line combinatio so an additional line series is used as an anchor for a vertical line and label. Using a line chart allows us to use versatile time scale axis of the line chart as the horizontal axis of the Gantt chart. Sample Data

The table below contains the data for this example. The sections of the data range are described in more detai

The green shaded range (columns A through D) contains the stacked bar data which is used to create the tim the chart.

The blue shaded range (columns F through I) contains the line chart data used to plot milestones and provid time scale horizontal axis. Column I within the blue range is filled with #N/A errors, enter the formula =NA() #N/A in the cells. In a Line or XY chart series, no marker is plotted for #N/A; if there are valid points on both the connecting line connects these valid points, interpolating across the #N/A.

The yellow shaded range below the blue shaded range is an extension of the line chart data. The yellow cells the vertical line(s); add more rows to add more vertical lines. The value in the yellow cell of column F could b dynamically linked to the current date by inserting the formula =TODAY() in the cell. Columns G and H within yellow range is filled with #N/A errors, enter the formula =NA() or type #N/A in the cells. The value of 0 in th cell(s) of column I is selected to put the point at the top edge of the chart.

The milestone values in column J (0.5, 1.5, etc.), which columns G and H link to, are defined to place the Fin and Unfinished markers at the mid-height of the Done/Not Done bars.

The user enters Task Name (column A), Start Date (B), either Duration (E) or End Date (F), and Percent Comp as well as the data in the yellow range. The other columns are calculated. A B C D E F G H

1 2 3

Task 1 Task 2

Start 4/5/2001 4/12/2001

Unfinishe Done Not Done Duration End Finished d 14 0 14 4/19/2001 0.5 #N/A 21 0 21 5/3/2001 1.5 #N/A

4 5 6 7 8 9 10 11

Task 3 Task 4 Task 5 Task 6 Task 7 Task 8 Task 9

4/25/2001 4/25/2001 5/15/2001 5/18/2001 5/18/2001 5/25/2001 6/5/2001

10.5 21 7 7 12.25 8.75 0

3.5 7 7 21 22.75 26.25 24

14 28 14 28 35 35 24

5/9/2001 5/23/2001 5/29/2001 6/15/2001 6/22/2001 6/29/2001 6/29/2001 6/1/2001

#N/A #N/A #N/A #N/A #N/A #N/A #N/A #N/A

2.5 3.5 4.5 5.5 6.5 7.5 8.5 #N/A

Formulas These are the formulas that make the chart work. Formulas filled down to row 10 Cell Formula C2: 0 D2: 0 E2*: 0 F2*: 0 G2: #N/A H2: 0 J2: 49.5 *Only E or F has formulas, depending on which is filled by the user. Constructing the Chart

To create the chart, select the data in range F1:I11 (the blue and yellow shaded regions in the table above), s Chart Wizard, and choose a Line chart in Step 1 of the wizard.

Delete the horizontal gridlines, and add vertical gridlines (Chart menu > Chart Options > Gridlines tab > Categ Major Gridlines).

Double click the horizontal (time) axis; on the Scale tab, set appropriate Minimum (4/1/01), Maximum (7/8/01 (14 days), and Minor (7 days) scale parameters. Also on the scale tab, uncheck the Value (Y) Axis Crosses Bet Dates checkbox. On the Number tab, choose an appropriate date format (m/d).

Click here to see chart with axes identified.

The new chart has only primary X and Y axes.

Select and copy range A1:D10 (shaded green above), select the chart, and use Paste Special from the Edit me add the data as New Series.

Select the Start series, then use Chart Type on the Chart menu to change the series to a Stacked Bar type.

Click here to see chart with axes identified.

The chart gains a secondary Y axis when the series is converted to a bar series.

Select the Done series, and again use Chart Type on the Chart menu to change the series to a Stacked Bar typ Repeat for the Not Done series. You can use the F4 key to repeat the latest action for the Not Done series, but the Done series; for some reason, when you assign the Stacked Bar type to the Start series in the previous ste considers it a Clustered Bar.

Choose Chart Options on the Chart menu, click on the Axes tab, and check the Secondary Category checkbox. adds the list of tasks as axis labels.

Click here to see chart with axes identified.

The chart has primary and secondary X and Y axes. The task labels (secondary X axis labels) are on the right, not the left.

Double click on the bottom time axis, and click on the Scale tab. Check the Value (Y) Axis Crosses at Maximum checkbox. This moves the numeric vertical axis from left to right (where the numbers temporarily overlap the t on the right axis).

Double click on the top time axis, and click on the Scale tab. Uncheck the Category (X) Axis Crosses at Maximu checkbox. This moves the task list to the left side of the chart.

Click here to see chart with axes identified.

The chart has primary and secondary X and Y axes. The task labels (secondary X axis labels) are on the left, where we want them.

Double click left (Task) axis, and click on the Scale tab. Check the Categories in Reverse Order box and unchec Value (Y) Axis Crosses at Maximum Category box, so the tasks are represented from top to bottom. Enter 1 in Number of Categories Between Tick Mark Labels box, to force Excel to display each label.

Double click on the right numerical axis. Check the Values in Reverse Order box and also the Category Axis Cro Maximum Value box. Make sure the minimum and maximum are set to 0 and 9, and uncheck the Auto box in f each, so Excel doesn't unexpectedly change the axis.

If more tasks are added, both vertical axes

be rescaled in tandem. On the Patterns tab, choose None for Tick Marks and Tick Labels to hide the num

Double click the top axis. Set the scale parameters to: Minimum 4/1/01, Maximum 7/8/01, Major Unit 14, Min to match the bottom time axis that was formatted earlier. Even though this is a value axis that is expecting a " number, Excel will accept numbers in date format. On the Patterns tab, set Tick Mark Labels to None.

Note: top and bottom time scales must be synchronized (manually) when the data chang

Format the bar timeline series and milestone markers. Make the Start series invisible by choosing None for Bor Area on the Patterns tab. Choose appropriate colors, marker shapes, and marker sizes for the other series.

Delete the Legend, and stretch the Plot Area to fill the whole chart.

Resize the plot area, moving down the top edge to make room for a label. Double click the Vert Line series (sin point in this example), and add data labels, using the Category Name option. Double click the data label, and o Alignment tab, choose Above for Label Position.

Double click on the Vert Line series, and on the Patterns tab, select None for Line and Marker. On the Y Error B choose Plus (it goes down , but the axis is plotted in reverse order), with a Fixed Value of 9 (to stretch from to bottom).

Click here to see chart with axes identified.

The chart has primary and secondary X and Y axes. The primary Y axis and secondary Y axis are hidden.

cel.

phically when tasks must start and cheduling of the many tasks in a Gantt chart is merely a floating bar visible. The second series of bars are because the first series is formatted to be es this simple approach.

visible bars, so the floating bar can es are added to show milestones for added to a Bar-Line combination chart, ing a line chart allows us to use the art.

nge are described in more detail:

a which is used to create the timelines in

ed to plot milestones and provide the errors, enter the formula =NA() or type if there are valid points on both sides, A.

line chart data. The yellow cells anchors e yellow cell of column F could be e cell. Columns G and H within the in the cells. The value of 0 in the yellow

k to, are defined to place the Finished

End Date (F), and Percent Complete (K),

% Vert Line Milestone Complete #N/A 0.5 100% #N/A 1.5 100%

#N/A #N/A #N/A #N/A #N/A #N/A #N/A 0

2.5 3.5 4.5 5.5 6.5 7.5 8.5

75% 75% 50% 25% 35% 25% 0%

d regions in the table above), start the

Options > Gridlines tab > Category Axis

mum (4/1/01), Maximum (7/8/01), Major k the Value (Y) Axis Crosses Between .

xes.

e Paste Special from the Edit menu to

series to a Stacked Bar type.

erted to a bar series.

e the series to a Stacked Bar type. ion for the Not Done series, but not for e Start series in the previous step, Excel

Secondary Category checkbox. This

Y axes. ght, not the left.

ue (Y) Axis Crosses at Maximum Value umbers temporarily overlap the task list

gory (X) Axis Crosses at Maximum Value

Y axes. here we want them.

n Reverse Order box and uncheck the d from top to bottom. Enter 1 in the each label.

x and also the Category Axis Crosses at 9, and uncheck the Auto box in front of

added, both vertical axes must

s and Tick Labels to hide the numbers.

mum 7/8/01, Major Unit 14, Minor Unit 7 a value axis that is expecting a "regular"

k Mark Labels to None.

Note: the ly) when the data changes.

visible by choosing None for Border and er sizes for the other series.

ble click the Vert Line series (single Double click the data label, and on the

ne and Marker. On the Y Error Bars tab, ed Value of 9 (to stretch from top to

Y axes. hidden.

Start Task 1 Task 2 Task 3 Task 4 Task 5 Task 6 Task 7 Task 8 Task 9 8/12/2008 8/19/2008 9/1/2008 9/1/2008 9/21/2008 9/24/2008 9/24/2008 10/1/2008 10/12/2008

Done 14 21 10.5 21 7 7 12.25 8.75 0

Not Done Duration 0 0 3.5 7 7 21 22.75 26.25 24

End

Finished 0.5 1.5 #N/A #N/A #N/A #N/A #N/A #N/A #N/A #N/A

Unfinishe d Vert Line #N/A #N/A 2.5 3.5 4.5 5.5 6.5 7.5 8.5 #N/A #N/A #N/A #N/A #N/A #N/A #N/A #N/A #N/A #N/A 0

14 8/26/2008 21 9/9/2008 14 9/15/2008 28 9/29/2008 14 10/5/2008 28 10/22/2008 35 10/29/2008 35 11/5/2008 24 11/5/2008 4/14/2014

Task 1 Task 2 Task 3 Task 4 Task 5 Task 6 Task 7 Task 8 Task 9 8/1 8/15 8/29 9/12 9/26 10/10 10/24 11/7

% Milestone Complete 0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5 100% 100% 75% 75% 50% 25% 35% 25% 0% 1

11/21

Você também pode gostar