Excel 2010中带条形图的折线图

时间:2011-12-08 00:59:17

标签: excel graph excel-vba excel-2003 vba

我需要为当前时间段的结果创建条形图,以及显示上一时间段的折线图,这是使用Excel 2010工作簿。

Bar Graph with a Line Graph

Excel 2003或Excel 2010工作簿中是否可以使用上述图表类型?如果是这样,我该怎么做?

我在某处读过XY簇图可以解决这个问题,但是无法再现相同的效果。

1 个答案:

答案 0 :(得分:2)

略微整理录制的宏:

With ActiveSheet.Shapes.AddChart.Chart
    .SetSourceData Source:=Range("'Sheet1'!$B$7:$E$14")
    .ChartType = xlColumnClustered
    .SeriesCollection(3).ChartType = xlLine
End With

我的示例的源数据:

Month     Series1  Series2  Series3
J       10       15       5
F       20       30       10
M       30       45       15
A       40       60       45
M       50       75       72
Jun     60       90       24
Jul     70       105      35