|
楼主 |
发表于 2019-12-2 09:49
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub Charting_Click()
2.Dim vntD, I&, N&, C&, dblS#()
3.vntD = Worksheets("数据源").UsedRange
4.For I = 3 To UBound(vntD, 2)
5. If vntD(1, I) = [C3] Then N = I: Exit For
6.Next
7.For I = 2 To UBound(vntD)
8. If vntD(I, 1) = [C1] Then
9. If vntD(I, 2) = [C2] Then
10. ReDim Preserve dblS(C)
11. dblS(C) = vntD(I, N)
12. C = C + 1
13. End If
14. End If
15.Next
16.Worksheets("查询表").ChartObjects("图表 3").Chart.SeriesCollection(1).Values = dblS()
17.End Sub
16句出错了? |
|