-
VBA - Code. Chart selecting the wrong range of data HELP!
Good Morning.
I've created a Macro to analyse all data in a selected folder.
The macro opens each file, completes some basic formatting, and then create a chart. All data are in columns A to M. X axis being the A culumn and B to M being in the Y axis.
Currently in some cases the data picks up at random points. When all data ranges should start from cell2 of each column.
Here's my code for the chart....
'Chart code here
ActiveSheet.Shapes.AddChart2(240, xlXYScatterSmoothNoMarkers).Select
Dim s
For m = 2 To 11
Set s = ActiveChart.SeriesCollection.NewSeries()
With s
.Name = Range("B" & m)
.XValues = Range("A" & m)
.Values = Range("B" & m)
End With
Next m
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules