如何在下面的代码中实现.IncrementLeft 360
,使图形不会堆叠在一起?我需要它们彼此相邻。
Sub AddChartsTemplate()
Dim i As Integer 'rows
Dim j As Integer 'columns
i = Cells(Rows.Count, 2).End(xlUp).Row
For j = 5 To 9
With ActiveSheet.Shapes.AddChart.Chart
.ChartType = xlLine
.SeriesCollection.NewSeries
With .SeriesCollection(1)
.XValues = "=" & ActiveSheet.Name & "!" & _
Range(Cells(12, 2), Cells(i, 2)).Address
.Name = "=" & ActiveSheet.Name & "!" & _
Cells(10, j).Address
.Values = "=" & ActiveSheet.Name & "!" & _
Range(Cells(12, j), Cells(i, j)).Address
End With
' .HasLegend = False
End With
Next j
End Sub
字符串
1条答案
按热度按时间5t7ly7z51#
你可以这样做:
字符串