Author: Oscar Cronquist Article last updated on April 08, 2019

This Gantt chart uses a stacked bar chart to display the tasks and their corresponding date ranges. Completed days are green and remaining days are red, see image above.

The chart utilizes an Excel defined Table in a very efficient way, you don't need to adjust chart data source ranges when you add or delete records. The Excel defined Table takes care of that for you.

How to build worksheet

First you need to convert your data into an Excel defined Table.

Excel defined Table

  1. Select a cell in your data set.
  2. Press CTRL + T.
  3. Enable the checkbox if the data set contains column headers.
  4. Press with left mouse button on OK.

Now you need to create a stacked bar chart.

Insert a stacked bar chart

  1. Select one of the cells in the Excel defined Table.
  2. Go to tab "Insert" on the ribbon.
  3. Press with mouse on "Insert Column or Bar Chart" button.
  4. Press with mouse on "Stacked Bar chart" button.
  5. A chart appears, however, we need to customize it quite a lot before we can use it.

Customize stacked bar chart

The data source ranges are not what we want but we can easily change those.

  1. Press with right mouse button on on chart
  2. Select "Data source..."
  3. Change the first Legend entry "Days" so i points to column "Start Date" in the Excel defined Table".
  4. Press with left mouse button on "Edit" button (Horizontal (Category) Axis Labels and change the cell reference so it points to the "Activity" column on the Excel defined Table.
  5. Press with left mouse button on OK button.

The chart now looks like this:

We are now going to remove the blue bar.

  1. Double-press with left mouse button on one of the blue bars to open the format pane.
  2. Press with mouse on the Fill & Line button.
  3. Select "No fill".

If you want the tasks to be arranged in reverse order then follow these steps.

  1. Double press with left mouse button on the y-axis categories to open the Format Pane, see image above.
  2. Press with mouse on "Axis Options" button.
  3. Press with left mouse button on the checkbox "Categories in reverse order.

The image now looks like this, the dates are however in a mess.

  1. Double-press with left mouse button on x-axis values to open the Format Pane.
  2. Press with mouse on "Axis Options" button.
  3. The "minimum" value is the number equivalent to an Excel date, in this case, 10/24/2011.  The first date range starts at 20/11/2011 which is number 40868. I will use 40867.
  4. Feel free to change the maximum value as well.

I recommend that you apply minor gridline to make the chart easier to read.

  1. Press with right mouse button on on x-axis values.
  2. Press with left mouse button on "Add minor gridlines".
  3. Change the "Minor" value to 1 in the Format Pane.
  4. Select and delete the major gridlines.

Repeat above steps but this time with y-axis values.

If you prefer the x-axis values below the chart then double-press with left mouse button on the y-axis values to open the Format Pane.

Press with left mouse button on "Horizontal axis crosses" At maximum category.

Get the Excel file


Dynamic-Gantt-Chart-v3.xlsx

Recommended blog posts

Gantt Chart with Repeated Tasks via Excel XY Chart | Peltier Tech BlogÂ