<< Prev        Next >>

ID : 777

Value Display Formatting Character

Value display formatting character is a character to specify display format used in Format function. Recognizing an argument designated in expression as a value, it is converted into the specified display format.

Character(s) Description
None Return a specified value as it is.
0

Use this to specify digit position or digit number. When you use a display formatting character "0" once in the format string specified in an argument format, it means single-digit of a value. When a value (formula) for the conversion uses the digit position specified by "0", a value proper to the digit will be entered. If there is less digit number of the value for the conversion and there is no proper value for specified digit position, "0" will be entered in the digit.

When a digit number of integer part or decimal part of the value designated by an argument expression is less than the digit position specified by "0" in the formatting, 0 will be added to the digit position. And, when a digit number of decimal part of the value is beyond the digit position of "0" specified at the decimal part, the decimal part of the value will be rounded off corresponding to the specified digit position. While, when a digit number of integer part of the value is beyond the digit position of "0" specified at the integer part, the whole integer part will be displayed without changing any part.

(#)

Use this to specify digit position or digit number. When you use a display formatting character "#" once in the format string specified in an argument format, it means single-digit of a value. When a value (expression) for the conversion uses the digit position specified by "#", a value proper to the digit will be entered. If there is less digit number of the value for the conversion and there is no proper value for specified digit position, nothing will be entered in the digit.

This character acts like display formatting character "0", but when a digit number of decimal part or integer part of the value is less than the digit position specified by "#", "0" will not be inserted and nothing will be entered in the digit.

(.) Combined with a display formatting character ("0" or "#"), use this character to specify the position of decimal point. When specifying the digit number for display, the position of this display formatting character defines integer part and decimal part. When only "#" is designated in the left of "." in the specifying format, a value less than 1 will be started with decimal point character. If you wish to add "0" anytime at the left of a decimal point character when the value is less than 1, use "0" (not "#") at the left of " " in the specifying format. A decimal point character after the conversion will be defined by language setting.
(%) Use this character when you centuple a value and add percent symbol (%).
(,) Use this character as a thousands separator. A value which has more than 4 digits in its integer part, a thousands separator will be shown up. A thousands separator after the conversion will be defined by language setting. Generally, "0" or "#" will be used before or after this display formatting character ",". When you don't use "0" or "#" at the right side of this display formatting character ",", or when you use "," once or more than 2 times in a row at the right edge of the integer part (display specifying setting of decimal part is optional), the value for the conversion will be converted to the value with thousands separator(s). In this case, the value will be rounded corresponding to the specified digit position. For example, when you specify "##0,," as formatting string, a value 100000000 (100 million) will be converted to 100. A value less than one million will be 0. When you use this display formatting character "," more than 2 times in a row at the point other than the right edge of the integer part, the result will be the same of when you use "," once.
(:) Use this character as a time separator. Time will be separated into hour, minute, second with the separator. Time separator after the conversion will be defined by language setting.
(/) Use this character as a date separator. Date will be separated into year, month and date with the separator. Separator after the conversion will be defined by language setting.
(E- E+ e- e+) Use this character for exponent notation. When you use "0" or "#" more than once at the right side of either of "E-", "E+", "e-" or "e+", a value will be displayed in exponent notation, and "e" or "E" will be inserted between the integer part and exponent part. The number of "0" or "#" designated at the right side of these display formatting characters means the digit number of the exponent part. When using "E-" or "e-" and if an exponent is negative value, minus sign will be added. In the case of "E+" or "e+", plus sign or minus sign will be added corresponding to the exponent's value (positive/negative).
- + $ ( ) space Insert a character which you specify as it is. To insert a display formatting character other than these characters, add Yen sign (\) before the character or put the character in double quotation marks ("").
(\)

Display a character which followed the characters as it is. Within format specification, to display a character like "#" or "E" which has a special meaning as it is, add Yen sign (\) before the character. In this case, Yen sign (\) you added will not be displayed. Double quotation marks ("") will not be displayed either. To insert Yen sign (\), enter Yen sign (\) more than 2 times (\\).

Characters - which cannot be inserted as they are - are display formatting characters of date and time (a, c, d, h, m, n, p, q, s, t, w, y, /, :), display formatting characters of value (#, 0, %, E, e, comma, period) and display formatting characters of string (@, &, <, >, !) etc.

("ABC") String enclosed by double quotation marks ("") will be inserted as they are. To include string in a formatting argument format, use Chr(34) to enclose the string. Double quotation marks ("") are 34 in character code.

ID : 777

<< Prev        Next >>