Quote:
Originally Posted by whatsup
Pocerus, what's the loop for?
|
Quite.
Is this what you're looking to do? (all subs rolled into 1):
Code:
Sub setDataChart()
Range("A1").Value = 1
Range("A1:A6").DataSeries
With ActiveSheet.Shapes.AddChart
.Chart.ChartType = xlXYScatterSmoothNoMarkers
.Height = 325
.Width = 900
.Top = 120
.Left = 10
Range("B1:FA6").Formula = "=RANDBETWEEN(0,10)"
For i = 2 To 157
.Chart.SetSourceData Source:=Union(Range("A1:A6"), Range("A1:FA6").Columns(i))
Application.ScreenUpdating = True
MsgBox "OK to continue…"
Next i
End With
End Sub