G
Guest
Hi,
I have a series in the graph, a column B starting from row 1 to 20. These
values are populated from other source and not always there will be value in
each cell, however the continuity of the graph should be kept. Because of the
no values in the cell the series graph is incomplete. CAn we programatically
complete the series? Suppose this the the series:
Col B
90.00
95.00
90.00
95.00
90.00
10.00
25.00
70.00
80.00
90.00
90.00
98.00
End
The series in the graph is getting truncated after first break in the values.
Pls help me.
*******************
Sample code:
Sub GenerateGraph()
Dim NewSet As String
Dim NewSet1 As String
Dim CurLocation As String
CurLocation = ActiveCell.Address
NewSet = "B2:" & Range("B2").End(xlDown).Address
NewSet1 = "C2:" & Range("C2").End(xlDown).Address
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData _
Source:=Union(Sheets(ActiveSheet.Name).Range(NewSet), _
Sheets(ActiveSheet.Name).Range(NewSet1))
Range(CurLocation).Select
End Sub
I have a series in the graph, a column B starting from row 1 to 20. These
values are populated from other source and not always there will be value in
each cell, however the continuity of the graph should be kept. Because of the
no values in the cell the series graph is incomplete. CAn we programatically
complete the series? Suppose this the the series:
Col B
90.00
95.00
90.00
95.00
90.00
10.00
25.00
70.00
80.00
90.00
90.00
98.00
End
The series in the graph is getting truncated after first break in the values.
Pls help me.
*******************
Sample code:
Sub GenerateGraph()
Dim NewSet As String
Dim NewSet1 As String
Dim CurLocation As String
CurLocation = ActiveCell.Address
NewSet = "B2:" & Range("B2").End(xlDown).Address
NewSet1 = "C2:" & Range("C2").End(xlDown).Address
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData _
Source:=Union(Sheets(ActiveSheet.Name).Range(NewSet), _
Sheets(ActiveSheet.Name).Range(NewSet1))
Range(CurLocation).Select
End Sub