Name column B Xaxis and columns E to R data
Sub plot()
Dim c As Range
For Each c In Range("Data").Rows(1).Cells
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:=c.Value
ActiveChart.SetSourceData Source:=Union(Range("xaxis"), c.Resize(Range("xaxis").Rows.Count, 1))
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = c.Value
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Date"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = c.Value
End With
Next c
End Sub
Bookmarks