You are on page 1of 4

Gantt Charts in Microsoft Excel

by Jon Peltier, MVP


Gantt Charts Gantt charts are a special kind of bar chart used in scheduling and program management. A set of tasks or activities is listed along the left hand axis, and the bottom axis shows dates. The bars indicate when each task begins and ends, and which tasks are in progress at any given time. Let's use the following data for an example: Start Task 1 4/5/2004 Task 2 4/12/2004 Task 3 4/25/2004 Task 4 4/25/2004 Task 5 5/15/2004 Task 6 5/18/2004 Task 7 5/18/2004 Task 8 5/25/2004 Task 9 6/5/2004 Duration End

14 4/19/2004 21 5/3/2004 14 5/9/2004 28 5/23/2004 14 5/29/2004 28 6/15/2004 35 6/22/2004 35 6/29/2004 24 6/29/2004

A Simple Gantt Chart Using Worksheet Formatting The simplest kind of gantt chart involves a worksheet range, with the tasks listed as above, and dates in the top row. If a date along the top falls between the start and end dates for that task, the cell in the same row as the task is shaded a different color:

4/5 4/12 4/19 4/26 5/3 5/10 5/17 5/24 5/31 6/7 6/14 6/21 6/28 Task 1 Task 2 Task 3 Task 4 Task 5 Task 6 Task 7 Task 8 Task 9

Not very fancy, but sometimes all you need is a quick graphic. The cells can be shaded manually as illustrated below, or with conditional formatting.

To implement conditional formatting, my example worksheet had the first table in A3:D12, and the second table in F3:S12. I selected the range G4:S12, selected Conditional Formatting from theFormat menu. Under Condition 1, I selected Formula Is in the dropdown, and I wrote this formula in the space to the right: =AND(G$3>=$B4,G$3<$D4)=TRUE I clicked on Format, and chose a medium gray color, then I clicked OK. Here's the Excel worksheet version:

While this is a simple approach, it can be widely embellished; you can add labels in neighboring cells, you can vary the cell fill colors to indicate what portion of a task is finished, you can use a dark border to indicate today's date. In fact, there are a number of commercial add-ins that create gantt charts by this technique. But it's not a "true" chart.

A Simple Gantt Chart Using an Excel Stacked Bar Chart We'll use the same starting worksheet range to make our next chart. The top left cell is blank to remind Excel to use the first row as series names and the first column as category labels. Select the first three columns in the data range (omit the End dates), and create a stacked bar chart.

Okay, it's not yet ready for sharing with your project team members. But it only takes a few steps to fix up. First, double click the category axis (the task names along the left edge of the chart). On the Scale tab, check the Categories in Reverse Order and the Value (Y) Axis Crosses at Maximum Category options, and type a 1 in the Number of Categories Between Tick Marks box. Double click the Value axis (the times across the bottom), and pick a better set of parameters on the Scale tab. I've chosen a minimum of April 1, 2004, and changed the major spacing to 14 days (2 weeks). Quick Trick: Even though Excel expects a number (for example, April 1, 2004 = 38078) in the axis scale parameter boxes of a value axis, you can type in a date, and Excel will convert it for you. This works if you are entering times, as well.

Now format the other elements of the chart. Most important, double click on the Start series, and click on the Patterns tab. Select None for Border and Area, to make this series disappear. Format the Duration series and the plot area the way you like them. And delete the legend.

On my web site I have amassed a collection of links about Gantt Charts in Excel. These are divided into floating bar charts (above) and worksheet formatting (beginning of article). There are hundreds more such links out there; I've merely included the first several of each type that seemed reliable.

You might also like