There are many graphical features available in Microsoft Excel. Users use those features to represent statistical data. The Excel bar chart is one of them. Sometimes, users need to flip bar charts for working purposes. In this article, we will show you how to flip a bar chart in Excel.
How to Flip Bar Chart in Excel: 2 Handy Ways
Our working procedure will consist of two methods. In our first method, we will format the axis of a bar chart to flip the chart. As for the second one, we will apply a VBA code to get the final result. For both procedures, we will use the following data set. Here, we have some random data regarding the sales of a store for eight years. So, in this article, you will see two completely different approaches to the flip bar chart in Excel by using the following data set.
1. Formatting Axis to Flip Bar Chart
This method is really easy and simple. After creating a bar chart in Excel, we will flip the chart by formatting its axis. We will discuss the detailed procedure in the following steps.
Step 1:
- First of all, select the cell range B4:C12.
Step 2:
- Secondly, go to the Insert tab of the ribbon.
- Then, click on the little arrow that is on the lower right side of the Charts group.
Step 3:
- Thirdly, you will see the Insert Chart dialogue box.
- Then, from the All Charts tab go to Bar.
- In our procedure, we will choose the Clustered Bar chart like in the following figure.
- Lastly, press OK.
Step 4:
- Fourthly, you will see a bar chart in the worksheet after following the previous steps.
Step 5:
- Fifthly, name the chart as Sales per Year.
Step 6:
- In the sixth step, double-click on the lower axis of the chart using the mouse.
Step 7:
- In the seventh step, you will see the Format Axis window panel.
- From there, go to Text Options.
- Then, under the Axis Options label, mark the box named Values in reverse order.
Step 8:
- Finally, you will be able to flip the bar chart after reversing the order.
Read More:Â How to Create a 3D Bar Chart in Excel
2. Applying VBA to Flip Bar Chart in Excel
In our second procedure, we will apply a VBA code to flip a bar chart. By applying a VBA code, we will be able to complete our task without formatting. We just have to input the proper command into the code to flip the chart. For a better understanding, go through the following steps.
Step 1:
- Firstly, draw a bar chart by using the following data set.
- To do this, follow Step 1 to Step 5 from the previous method.
Step 2:
- Secondly, go to the Developer tab of the ribbon.
- Then choose the Visual Basic command from the Code group.
Step 3:
- Thirdly, you will see the VBA
- Then, from the Insert tab select Module.
Step 4:
- Fourthly, copy the following code and paste it into the module.
Sub Flip_Bar_Chart_in_Excel()
'Activating the chart that we want to flip
ActiveSheet.ChartObjects("Chart 3").Activate
'Selecting chart axis
ActiveChart.Axes(xlValue).Select
'Giving command to flip the bar chart
ActiveChart.Axes(xlValue).ReversePlotOrder = True
End Sub
VBA Breakdown
- The function name is Flip_Bar_Chart_in_Excel.
- ChartObjects(“Chart 3”).Activate: First, select and activate the chart that we want to flip.
- Axes(xlValue).Select: Secondly, select the horizontal axis of the chart.
- Axes(xlValue).ReversePlotOrder = True: Finally, the bar chart will be flipped through this command.
Step 5:
- Then, save the VBA code and press F5 or the play button to run it.
Step 6:
- Finally, this VBA code will reverse the axis order of the bar chart thus flipping it.
Read More:Â How to Make Floating Bar Chart in Excel
Download Practice Workbook
You can download the free Excel workbook here and practice on your own.
Conclusion
That’s the end of this article. We hope you find this article helpful. After reading the above description, you will be able to flip the bar chart in Excel by using any of the above-described methods. Please share any further queries or recommendations with us in the comments section below.
Related Articles
- How to Show Variance in Excel Bar Chart
- How to Create a Bar Chart with Standard Deviation in Excel
- How to Create Overlapping Bar Chart in Excel
- How to Create a Radial Bar Chart in Excel
- How to Create Construction Bar Chart in Excel
- How to Create Butterfly Chart in Excel
<< Go Back to How to Edit Bar Graph in Excel | Excel Bar Chart | Excel Charts | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!