Syntax

expression.DisplayErrorString

expression A variable that represents a PivotTable object.

Remarks

Use the property to set the custom error string.

This property is particularly useful for suppressing divide-by-zero errors when calculated fields are pivoted.

Example

This example causes the PivotTable report to display a hyphen in cells that contain errors.

Visual Basic for Applications
With Worksheets(1).PivotTables("Pivot1") .ErrorString = "-" .DisplayErrorString = True End With
display character error in pivottable display custom string pivot table cell containing error display error string Display Error String Property displayerror DisplayErrorString displayerrorstring property show custom error string for pivot table

See also: