使用VBA格式化Excel图表中的数据标签 [英] Formatting data labels in Excel charts using VBA
本文介绍了使用VBA格式化Excel图表中的数据标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将下面图片的数据标签从小数点(0.8102),如蓝色部分更改为百分比(81.02%),如堆叠图表的红色部分。
I would like to change the data labels for the picture below from decimals (0.8102), like that of the blue part, to percentage (81.02%), like the red part of the stacked chart.
我已尝试录制一个宏,但没有显示任何格式化数据标签的代码。
I have tried recording a macro but it does not show any code for the formatting of data labels.
推荐答案
ActiveChart.SeriesCollection(1).DataLabels.NumberFormat = "0.00%"
这篇关于使用VBA格式化Excel图表中的数据标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文