SeriesCollection.ErrorBar

y0gster

New Member
Joined
Apr 12, 2011
Messages
4
I have a chart with series that sometimes contains error bars. I would like to use that chart as reference to other charts on which series contains error bars. Is this possible, knowing which specific serieses contain the error bar?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You can use the HasErrorBars property of the series.

Code:
Sub x()

    Dim objChart As Chart
    Dim objSeries As Series
    Dim objErrBars As ErrorBars
        
    Set objChart = ActiveSheet.ChartObjects(1).Chart
    
    For Each objSeries In objChart.SeriesCollection
        If objSeries.HasErrorBars Then
            Set objErrBars = objSeries.ErrorBars
            Debug.Print "Has Error bars "; objSeries.Name
        Else
            Debug.Print "Not for "; objSeries.Name
        End If
    Next

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,596
Messages
6,179,807
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top