Hi Everyone,
I would like a vba code that will convert my chart series into values. This will be a daily process.
Hi Everyone,
I would like a vba code that will convert my chart series into values. This will be a daily process.
SHAZAM!
Please write details, what actually you want to do ?
Prasad Joshi
I believed I found what I was looking for. This code below will convert my chart series into arrays values.
[vba]
Sub Convert_Chart_Series_Into_Arrays()
Dim mySeries As Series
Dim sChtName As String
''' Make sure a chart is selected
On Error Resume Next
sChtName = ActiveChart.Name
If Err.Number <> 0 Then
MsgBox "This functionality is available only for charts " _
& "or chart objects"
Exit Sub
End If
If TypeName(Selection) = "ChartObject" Then
ActiveSheet.ChartObjects(Selection.Name).Activate
End If
On Error GoTo 0
''' Loop through all series in active chart
For Each mySeries In ActiveChart.SeriesCollection
'''' Convert X and Y Values to arrays of values
mySeries.XValues = mySeries.XValues
mySeries.Values = mySeries.Values
mySeries.Name = mySeries.Name
Next mySeries
End Sub
[/vba]
SHAZAM!