DataBar.PercentMax property (Excel)

Returns or sets a Long value that specifies the length of the longest data bar as a percentage of cell width.

Syntax

expression.PercentMax

expression A variable that represents a DataBar object.

Remarks

The value must be a whole number between 0 and 100. The default value is 100.

The effect of the PercentMax property varies depending on the setting of the AxisPosition property of the DataBar object.

When the AxisPosition property is xlDataBarAxisAutomatic and the range contains both positive and negative values, the sum of the lengths of the longest positive data bar and the longest negative data bar will not exceed the value specified by the PercentMax property.

When the AxisPosition property is xlDataBarAxisMidpoint, the longest data bar (positive or negative) will be equal to the value of the PercentMax property divided by 2.

When the AxisPosition property is xlDataBarAxisNone, the length of the longest data bar is always the percentage of the cell width specified by the PercentMax property.

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.