Hi Tim,
Try this code. The problem arises when the first item in the data series is blank or NA().
So this replaces the first pair of values and plots the series.
Then it replaces the orginial values.
VB:
Sub ChartNAData()
Dim rngXs As Range
Dim rngYs As Range
Dim vntTempX As Variant
Dim vntTempY As Variant
Set rngXs = Range("B3:B13")
Set rngYs = Range("C3:C15")
vntTempX = rngXs.Cells(1, 1).Formula
rngXs.Cells(1, 1) = 1
vntTempY = rngYs.Cells(1, 1).Formula
rngYs.Cells(1, 1) = 1
With ActiveChart
.SeriesCollection(1).XValues = rngXs
.SeriesCollection(1).Values = rngYs
rngXs.Cells(1, 1).Formula = vntTempX
rngYs.Cells(1, 1).Formula = vntTempY
End With
End Sub
I did a little testing including setting all data values to NA().
I would be interested to know if this code works on your charts.
Bookmarks