Using VBA, I coded data labels onto a stacked bar graph. See the code below.
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(5).ApplyDataLabels
ActiveChart.SeriesCollection(5).Name = "Score"
ActiveChart.SeriesCollection(5).Values = Range(startData.Offset(0, 38), startData.Offset(2, 38))
ActiveChart.SeriesCollection(5).DataLabels.NumberFormat = "0%"
I want to add text to the end so that the data label gives the percentage and some text like 82%ile. The 82 value is calculated by the worksheet in the cell. I concatenated a value in another cell with "ile", but when the VBA selects those cells, I just get unformatted numbers without the text.
I am using Excel 2007 on a windows machine. I have searched for a couple of hours on the forums. I would appreciate any help. Thanks!
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(5).ApplyDataLabels
ActiveChart.SeriesCollection(5).Name = "Score"
ActiveChart.SeriesCollection(5).Values = Range(startData.Offset(0, 38), startData.Offset(2, 38))
ActiveChart.SeriesCollection(5).DataLabels.NumberFormat = "0%"
I want to add text to the end so that the data label gives the percentage and some text like 82%ile. The 82 value is calculated by the worksheet in the cell. I concatenated a value in another cell with "ile", but when the VBA selects those cells, I just get unformatted numbers without the text.
I am using Excel 2007 on a windows machine. I have searched for a couple of hours on the forums. I would appreciate any help. Thanks!