FormatPercent

This function formats an expression as a percentage (multiplied by 100) with a trailing % character.

Syntax

FormatPercent(Expression, [NumDigitsAfterDecimal], [IncludeLeadingDigit], [UseParensForNegativeNumbers], [GroupDigits])

Parameters

Expression
Required. Expression to be formatted.
NumDigitsAfterDecimal
Optional. Numeric value that indicates how many places to the right of the decimal are displayed. Default value is –1, which indicates that the computer's regional settings are used.
IncludeLeadingDigit
Optional. Tristate constant that indicates whether or not a leading 0 is displayed for fractional values. The following table shows the settings for the IncludeLeadingDigit parameter.
Constant
Value
Description
TristateTrue –1 True.
TristateFalse 0 False.
TristateUseDefault –2 Use the setting from the computer's regional settings.

UseParensForNegativeNumbers
Optional. Tristate constant that indicates whether or not to place negative values within parentheses. The following table shows the settings for the UseParensForNegativeNumbers parameter.
Constant
Value
Description
TristateTrue –1 True.
TristateFalse 0 False.
TristateUseDefault –2 Use the setting from the computer's regional settings.

GroupDigits
Optional. Tristate constant that indicates whether or not numbers are grouped using the group delimiter specified in the control panel. The following table shows the settings for the GroupDigits parameter.
Constant
Value
Description
TristateTrue –1 True.
TristateFalse 0 False.
TristateUseDefault –2 Use the setting from the computer's regional settings.

Return Values

Returns a formatted percentage value.

Remarks

The regional settings provide values for omitted parameters.

The Number tab of the regional settings provides all settings information.