Hi:
My first post .

So l have a set of data that was plotted on a previous graph, and using a userform l have selected the named ranges that l need to look at more closely, and have dump them on the next sheet in a named range called "ChanelSelRnge". The code below is my attempt to replot these data sets from the named range, but although l get the plot to graph, it only plots a single point that correspond to the named ranges. Confusing?.. to me too . I get the runtimne error 1004. that stipulates that the range method fails.. any help would be appreciated.

Code:\
sFileName = ActiveWorkbook.Name

Application.Goto Sheets("CorrectedData").Range("ChanelSelRnge")

ChannelsNum = Application.WorksheetFunction.CountIf(Sheets("CorrectedData").Range("Chanel SelRnge"), "*")

MsgBox "The result is " & ChannelsNum

NameCht1 = Left(sFileName, Len(sFileName) - 4) & "a"

Set ChtChart1 = Charts.Add
ChtChart1.Move after:=Worksheets("Data")
With ChtChart1
.Name = NameCht1
.HasTitle = True
.ChartTitle.Text = NameCht1
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Time(secs)"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Wall Displacement(mm)& Wall Acceleration (m/s2)"
.ChartType = xlXYScatter
'Do Until .SeriesCollection.Count = 0
'.SeriesCollection(1).Delete
'Loop


For i = 1 To ChannelsNum

With ChtChart1.SeriesCollection.NewSeries
.Values = Worksheets("CorrectedData").Range("ChanelSelRnge")(i)
.Name = Range("ChanelSelRnge")(i)
.XValues = Worksheets("Data").Range("Time_Duration1")


End With
Next
End With

EndCode:\

Thxks

Ben