Formatting Decimal Variables

The Decimal Variable can be inserted as part of entered text to show the value of another variable in decimal form within the text of a figure. Refer to the Text Variable Table for a list of all supported variables.

Any of the listed pre-formatted numerical variables can have a "D" placed in front of it (as long as they correspond with the type of selected figure) to insert the value as a decimal. The following screenshot shows an example of this:


Both the D and first letter of the entered variable must be capitalized for the value to appear in the selected figure.

By default, the decimal value will be presented with at most 4 digits after the decimal point. An alternative formatting style can be specified by using the {Dxxxx:format} pattern. The table below outlines the options for formatting the decimal value.

Format Specifier Name Description Examples
0 Zero Placeholder Replaces the zero with the corresponding digit if one is present, otherwise zero appears in the result.

Width = 1234.5678
Variable = {DWidth:00000}
Result = 01234

Width = 0.45678
Variable = {DWidth:0.00}
Result = 0.46

# Digit Placeholder Replaces the pound sign with the corresponding digit if one is present; otherwise, no digit appears in the result string. Width = 1234.5678
Variable = {DWidth:#####}
Result = 1234

Width = 0.45678
Variable = {DWidth:#.##}
Result = .46
. Decimal Point Determines the location of the decimal separator in the result string.

Width = 0.45678
Variable = {DWidth:0.00}
Result (US) = 0.46



Width = 0.45678
Variable = {DWidth:0.00}
Result (Germany) = 0,46

,

Group Separator



Inserts a group separator character between each group.



2147483647 ("# #,#") = 2,147,483,647 (US)



2147483647 ("# #,#") =
2.147.483.647 (Estonia)

, Number Scaling Divides a number by 1000 for specified commas.

2147483647 ("#,#,,") = 2,147 (US)



2147483647 ("#,#,,") =
2.147 (Estonia)

% Percent Placeholder Multiplies a number by 100 and inserts a localized percentage symbol in the result string.

0.03697 ("%,#0.00") = %36.97 (US)



0.03697 ("%,#0.00") = %36,97 (Greece)


0.03697 ("# #.0%") = 37.0% (US)


0.03697 ("# #.0%") = 37,0% (Greece)
Per Mille Placeholder Multiplies a number by 1000 and inserts a localized per mille symbol in the result string.

0.03697 ("# 0.00‰") = 36.97‰ (US)



0.03697 ("# 0.00‰") = 36,97‰ (Russia)



EO, E+0, E-0, e0, e+0, e-0

Exponential Notation

Zero - Formats in exponential notation.



E/e - Indicates case of the exponent symbol in the resulting string.



Plus Sign - Indicates that the sign character precedes the exponent.



Minus Sign - Indicates that a sign character precedes only negative exponents.



The number of zeros following the E/e symbol determines the minimum number of digits in the exponent (Must have at least one zero).



987654 ("# 0.0e0") = 98.8e4



1503.92311 ("0.0 # # e +00") = 1.504e+03



18901385E-16 ("0.0e +00") = 1.9e-16

'string', "string" Literal String Delimiter Indicates that the enclosed characters should be copied to the result string without changes.

68 ("# ' degrees'") = 68 degrees



68 ("# ' degrees'") = 68 degrees

; Section Separator Defines sections using separate format strings for positive, negative, and zero numbers.

12.345 ("# 0.0#; (#0.0#); -\0-") = 12.35



0 ("# 0.0#; (#0.0#); -\0-") = -0-



-12.345 ("# 0.0#; (#0.0#); -\0-") = (12.35)


12.345 ("# 0.0#; (#0.0#)") = 12.35

0 ("# 0.0#; (#0.0#)") = 0.0

-12.345 ("# 0.0#; (#0.0#)") = (12.35)
Other All Other Characters The character is copied to the result string unchanged. 68 (" # °") = 68 °

results matching ""

    No results matching ""