Column charts help to analyze and compare data. By creating a 2D clustered column chart in Excel, users can compare data from different variables. In this article, we will show you how to create a 2D clustered column chart in Excel.
How to Create a 2D Clustered Column Chart in Excel: 2 Easy Ways
Sometimes, users use more than one variable in their data set in Excel and want to describe them more meaningfully. Here they must use clustered column charts, as only column charts can be used with one variable. Using a 2D clustered column chart in Excel for this purpose is more meaningful. In this article, you will see two easy ways to create a 2D clustered column chart in Excel. In the first method, we will insert the data set into the Chart group to create a 2D clustered column chart, and in the second approach, we will apply Visual Basic Applications (VBA) for the same purpose. We will use the following data set for both the procedures.
1. Inserting Data Set to Chart Group to Create a 2D Clustered Column Chart
In this method, we will insert our data set into the Chart group of the Insert tab to create a 2D clustered column chart in Excel. Go through the following steps for this method.
- Firstly, select your entire data set.
- For instance, in our example it is B4:D10.
- Then, go to the Insert tab of the ribbon.
- From there, go to the Insert Column or Bar Chart command in the Chart group.
- Thirdly, under the 2-D Column options, choose the Clustered Column command.
- Finally, you will be able to create a 2D clustered column chart.
- Furthermore, you can make your chart more attractive by using the Style icon beside the chart.
- Consequently, the 2D clustered column chart will look more attractive.
2. Applying VBA to Create a 2D Clustered Column Chart
Aside from inserting the data set into the Chart group, you can also apply Visual Basic for Applications (VBA) to create a 2D clustered column chart in Excel. You can go through the steps below to understand the whole procedure.
- First of all, take the following data set to apply VBA.
- Secondly, go to the Developer tab in the ribbon.
- Then, choose the Visual Basic command from the Code group.
- Thirdly, you will see a new tab after choosing the command.
- From there, choose Module from the Insert tab.
- Fourthly, paste the following VBA Code into the Module.
Sub Create_a_2D_Clustered_Column_Chart() 'Declare range of selection Range("B4:D10").Select ActiveSheet.Shapes.AddChart.Select 'Set the data source ActiveChart.SetSourceData Source:=Range("'VBA'!$B$4:$D$10") 'define the chart type ActiveChart.ChartType = xlColumnClustered 'declare activation command ActiveSheet.ChartObjects(1).Activate ActiveSheet.ChartObjects(1).Cut 'define the chart destination Sheets("VBA").Select ActiveSheet.Paste 'return to current worksheet Sheets("VBA").Select Range("E5").Activate End Sub
- Then, save this and press the play button to run the code.
- Finally, you will create the 2D clustered column chart by applying VBA.
- Furthermore, you can change the color and appearance of your chart by using the Style icon.
- Lastly, you can get your desired chart by going through these steps.
You can download the free Excel workbook from here and practice on your own.
That’s the end of this article. I hope you find this article helpful. After reading this article, you will be able to create a 2D clustered column chart in Excel by using any of the methods. Please share any further queries or recommendations with us in the comments section below.