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. Click 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. Click on "Insert Column or Bar Chart" button.
  4. Click 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. Right click 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. Click "Edit" button (Horizontal (Category) Axis Labels and change the cell reference so it points to the "Activity" column on the Excel defined Table.
  5. Click OK button.

The chart now looks like this:

We are now going to remove the blue bar.

  1. Double-click on one of the blue bars to open the format pane.
  2. Click 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 click on the y-axis categories to open the Format Pane, see image above.
  2. Click on "Axis Options" button.
  3. Click the checkbox "Categories in reverse order.

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

  1. Double-click on x-axis values to open the Format Pane.
  2. Click 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. Right-click on x-axis values.
  2. Click "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-click the y-axis values to open the Format Pane.

Click "Horizontal axis crosses" At maximum category.

Download Excel file through email

Enter your email address to receive the workbook. Note, an email will actually be sent to you.
* You will also get a weekly newsletter, unsubscribe anytime!

Recommended blog posts

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