Series.ErrorBar method (Excel)

Applies error bars to the series. Variant.

Syntax

expression.ErrorBar (Direction, Include, Type, Amount, MinusValues)

expression A variable that represents a Series object.

Parameters

Name Required/Optional Data type Description
Direction Required XlErrorBarDirection The error bar direction.
Include Required XlErrorBarInclude The error bar parts to include.
Type Required XlErrorBarType The error bar type.
Amount Optional Variant The error amount. Used for only the positive error amount when Type is xlErrorBarTypeCustom.
MinusValues Optional Variant The negative error amount when Type is xlErrorBarTypeCustom.

Return value

Variant

Example

This example applies standard error bars in the Y direction for series one on Chart1. The error bars are applied in the positive and negative directions. The example should be run on a 2D line chart.

Charts("Chart1").SeriesCollection(1).ErrorBar _ 
 Direction:=xlY, Include:=xlErrorBarIncludeBoth, _ 
 Type:=xlErrorBarTypeStError

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.