VolMGDia(x) = volMGDia(x) + Val(Format(ActiveChart.SeriesCollection(c).Points(x).DataLabel.Text, “0”)) If LCase(ActiveChart.SeriesCollection(c).Name) “total” Thenįor x = 1 To ActiveChart.SeriesCollection(c).Points.Count You just need to prepare the graph regularly (do not concerne about percentage)… when you get done, apply the code.ĭim volMGDia(1000) As Double, c As Integer, x As Integer, vPerc As Double, n As Integer, vLabel As DoubleĪctiveChart.SetElement (msoElementDataLabelNone)ĪctiveChart.SetElement (msoElementDataLabelCenter)įor c = 1 To I did a little vba code wich helps as well. Now, we have something closer to what we want – a Stacked Column chart with Years on the X-Axis. We want the exact opposite, so click on the Switch Row/Column button. In this example, Excel chose the Regions as the X-Axis and the Years as the Series data. Your first results might not be exactly what you expect. Then, in the Insert menu tab, under the Charts section, choose the Stacked Column option from the Column chart button. To build a chart from this data, we need to select it. For this example, we’ll look at a few years of regional sales data. Most of the time, a vertical Stacked Column chart is the best option, but you can also use a Stacked Bar chart if your data (or data labels) require it. To get started, we need to build a stacked chart. This tutorial will walk through the steps to get you results like you see in the image. The good news is, there are work-arounds for displaying total volumes or dollars at the top of a stacked chart and percentages for each of the pieces. Unfortunately, the are somewhat limited, since they don’t automatically provide totals for the stack, and they don’t let you show the percentage contribution that each piece provides to the whole (like you can with pie charts in Excel). 7Download the Stacked Chart Percentages Example FileĮxcel’s Stacked Bar and Stacked Column chart functions are great tools for showing how different pieces make up a whole. 6Adding Percentages Automatically with an Add-In.4Adding Percentages to the Stacked Column Chart.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |