Excel 散点图最多能支持多少个点

2025-03-10 07:24:59
推荐回答(1个)
回答1:

Sub 宏2()
'先画出一条
Dim i, x, y
For i = 2 To 4 '4个样本 每17行一个样本
ActiveSheet.ChartObjects("图表 2").Activate '图表名 自己改
ActiveChart.SeriesCollection.NewSeries
x = Range(Cells(2 + (i - 1) * 17, 2), Cells(i * 17, 2))
y = Range(Cells(2 + (i - 1) * 17, 3), Cells(i * 17, 3))
ActiveChart.SeriesCollection(i).XValues = x
ActiveChart.SeriesCollection(i).Values = y

Next

End Sub