how to create a stacked bar chart with subcategories in excel


Often you may want to create a stacked bar chart in Excel with subcategories.

This tutorial provides a step-by-step example of how to create the following stacked bar chart with subcategories:

Let’s jump in!

Step 1: Enter the Data

First, let’s create the following dataset that shows the total sales of four different products at three different locations for some store:

Step 2: Insert the Stacked Bar Chart

Next, highlight the cell range A1:E4 and then click the Insert tab along the top ribbon, then click the icon titled Stacked Bar within the Charts group:

The following stacked bar chart will appear:

Step 3: Switch Rows and Columns

Next, right click anywhere on the chart and click Select Data from the dropdown menu:

In the new window that appears, click the button called Switch Row/Columns and click OK:

Step 4: Customize the Chart (Optional)

Feel free to add a title, customize the colors, and adjust the width of the bars to make the plot more aesthetically pleasing:

x