|
- Sub 宏1()
- xh = [d4]
- net = [a:a].Find(xh, lookat:=xlWhole).Offset(0, 1).Address
- With Sheets("Raw data")
- c = .Rows(1).Find(xh, lookat:=xlWhole).Column
- x = .Range(.Cells(2, c - 1), .Cells(65536, c - 1).End(3)).Address
- y = .Range(.Cells(2, c), .Cells(65536, c).End(3)).Address
- End With
- ActiveSheet.ChartObjects("Chart 1").Activate
- ActiveChart.SeriesCollection(1).Name = "=' Plots'!" & net
- ActiveChart.SeriesCollection(1).XValues = "='Raw data'!" & x
- ActiveChart.SeriesCollection(1).Values = "='Raw data'!" & y
- End Sub
复制代码 |
|