Group Data in Excel Chart

Grouping data in an Excel chart can help us understand our data better, identify patterns and trends, and communicate our findings more effectively to others.

For example, we may have sales data for every day of the year but grouping it by month or quarter can make the chart easier to read and interpret.

This tutorial shows how to group data in an Excel chart by month and quarter and how to create a grouped vertical bar chart.

How to Group Data in Excel Graph by Month

We may want to create an Excel chart and group the data by month.

Suppose we have the following dataset showing a sample of daily sales of a particular online store.

We want to create an Excel graph based on the dataset and group the data by month.

We use the following steps:

  1. Insert a column between columns A and B and label it “Month.”
Table

Description automatically generated
  1. Select cell B2 and enter the following formula:

=TEXT(A2,”mmm”)

Note: This formula uses the TEXT function to extract the month of the date in cell A2 and display it in the specified format.

Table, Excel

Description automatically generated
  1. Drag or double-click the Fill Handle to copy the formula down the column.

The months are shown in column B.

  1. Select the cell range B1:C13.
Graphical user interface, table, Excel

Description automatically generated
  1. Click Insert >> Charts >> Insert Column or Bar Chart >> Clustered Column.
Graphical user interface, application, table, Word

Description automatically generated

The clustered column chart with data grouped by month is inserted immediately.

How to Group Data in Excel Chart By Quarters

Sometimes we may need to create an Excel chart and group the data by quarters.

Presume we have the following dataset showing the quarterly sales of a particular furniture company.

We want to create an Excel graph based on the dataset and group the data by quarters.

We use the steps below:

  1. Select the cell range A2:E6.
  1. Click Insert >> Charts >> Insert Column or Bar Chart >> Stacked Column.

The stacked column chart is inserted into the worksheet:

Chart, bar chart, box and whisker chart

Description automatically generated

Switch the rows and columns by using the following steps:

  1. Select the graph, right-click it, and choose Select Data on the shortcut menu that appears.
  1. Click the Switch Row/Column button on the Select Datasource dialog box and click OK.
Graphical user interface, text

Description automatically generated
  1. Select the graph title and change it to “Quarterly Branch Sales.”
Chart, bar chart, box and whisker chart

Description automatically generated

How to Create a Grouped Vertical Bar Chart

Suppose we want to create a grouped vertical bar graph to communicate patterns and trends in a dataset.

Let’s consider the following dataset showing the monthly sales of specific branches of a particular technology company.

Table

Description automatically generated

We want to create a grouped vertical bar chart based on the dataset.

Follow these steps:

  1. Select the dataset and click Insert >> Charts >> Insert Column or Bar Chart >> Clustered Column.

The clustered column bar chart is inserted immediately and appears as follows:

The chart displays the sales of different branches for a specific month.

  1. To sort the dataset by branch, select the dataset, then click Data >> Sort & Filter >> Sort.
  2. On the Sort dialog box, open the Sort by drop-down, select Branch, and click OK.
Graphical user interface, text

Description automatically generated

The dataset is sorted by branch and appears as follows:

Notice the changes on the x-axis of the graph.

Chart, bar chart

Description automatically generated
  1. Insert a blank row after every branch group by selecting the row below the group, right-clicking it, and selecting Insert on the shortcut menu that appears.
Graphical user interface, application, table

Description automatically generated

The dataset appears below.

Table

Description automatically generated

Notice the changes in the x-axis of the chart.

  1. On the dataset, retain only one branch name in every branch group and delete the others.

Observe the changes on the x-axis of the chart.

Chart, bar chart

Description automatically generated
  1. On the dataset, switch the branch and month columns. First, select column B, right-click it, and choose Cut on the shortcut menu that appears.
Graphical user interface, table

Description automatically generated

Next, select column A, right-click it, and choose Insert Cut Cells on the shortcut menu that appears.

Graphical user interface, table

Description automatically generated with medium confidence

The Month and Branch columns are switched.

Table

Description automatically generated

Notice that the Branch column data no longer appears on the chart. To include the data, use the following steps:

  1. Select the graph, right-click it, and choose Select Data on the shortcut menu that appears.
  1. On the Select Data Source dialog box, click the range selector button on the Chart data range box.
  1. Drag to select the entire dataset.
Table

Description automatically generated
  1. Click the range selector button on the Chart data range box again to expand the dialog box and click OK.

The chart appears as the following:

Format the Chart

We format the chart using the steps below:

  1. Select the chart and press Ctrl + 1 to open the Format Chart Area pane.
  2. Open the Chart Options drop-down on the Format Chart Area pane and select Series “Sales (USD).”
  1. Click the Series Options button.
Graphical user interface, application

Description automatically generated
  1. Type 0 (zero) in the Gap Width box and press Enter.
Graphical user interface, application

Description automatically generated

The bars of each branch category are pulled close to one another.

  1. On the Format Data Series pane, click the Fill & Line button.
  1. Select the Vary colors by point option.

Each bar in the clustered column chart is displayed in a different color.

Chart, bar chart

Description automatically generated

Conclusion

Grouping data in an Excel chart can help us comprehend our data better, detect patterns and trends, and convey our findings more effectively to others.

For example, we may have sales data for every day of the year, but categorizing it by month or quarter can make the chart easier to read and interpret.

This tutorial showed how to group data in an Excel chart by month and quarter and how to create a grouped vertical bar chart.

Tomasz Decker is an Excel specialist, skilled in data analysis and financial modeling.