Format name |
Description |
General Number |
Display number with no thousand separators and no fixed number of decimal positions. |
Currency |
Display number with thousand separators, if appropriate; display two digits to the right of the decimal separator. Output is based on system locale settings. |
Fixed |
Display at least one digit to the left and two digits to the right of the decimal separator. Does not display thousand separators. |
Standard |
Display number with thousand separators, at least one digit to the left and two digits to the right of the decimal separator. |
Percent |
Display number multiplied by 100 with a percent sign (%) appended to the right; always display two digits to the right of the decimal separator. |
Function Call |
Output |
Format (12345.628, "Standard") |
12,345.63 |
Format (12345.628, "Currency") |
$12,345.63 |
Format (1 / 4, "Standard") |
0.25 |
Format (-1234, "Currency") |
($1,234.00) |
Format (-1234, "Standard") |
-1,234.00 |
Format (".2", "Currency") |
$0.20 |
Function Call |
Output |
FormatCurrency (12345.75) |
$12,345.75 |
FormatCurrency (12345.628) |
$12,345.63 (value rounded) |
FormatCurrency (12345.628, 0) |
$12,346 (value rounded) |
FormatCurrency (345) |
$345.00 |
FormatCurrency (-1234.56) |
($1,234.56) |