1
我想在Excel中繪製我的表格的結果。這裏是我有的代碼:excel 2007中的動態圖表
Sub bow()
'
' bow Macro
'
'
Worksheets("Sheet3").Select
tahX = Cells(3, 3).Value + 2
Xval = Offset(A1, 1, 2, 1, 1)
ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'Sheet3'!$12:$12,'Sheet3'!$10:$10")
ActiveChart.ChartType = xlXYScatter
ActiveChart.SeriesCollection(1).Name = "=""bowe"""
ActiveChart.SeriesCollection(1).XValues = "='Sheet3'!$12:$12"
ActiveChart.SeriesCollection(1).Values = "='Sheet3'!$10:$10"
End Sub
現在我想將X值限制爲在單元格C3中定義的值。例如,如果C3 = 20,我希望它只使用行號12中的前20個值。我該怎麼做?