[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

DOLLAR

Syntax:

DOLLAR ( number [ , num-decimal ] )

Description: Produces a string containing number rounded to num-decimal decimal places. The thousands separator, radix point, and currency symbol are locale-specific. The format used is $#,##0.00;($#,##0.00).

Arguments:

Name

Type

Description

number

number

The number that is to be formatted.

num-decimal

number

Designate the number of decimal places to be used in the resulting string; it is truncated to an integer. If num-decimal is negative, number is rounded to the left of the decimal point. If omitted, a value of 2 shall be assumed.

 

Return Type and Value: text – The string containing number rounded to num-decimal decimal places, and have a currency symbol and thousands separators.

[Example: In a US-English context:

DOLLAR(1234.567) results in $1,234.57
DOLLAR(1234.567,-2) results in $1,200
DOLLAR(-1234.567,4) results in ($1,234.5670)

In a France-French context:

DOLLAR(1234.567) results in 1 234,57 €
DOLLAR(1234.567,-2) results in 1 200 €
DOLLAR(-1234.567,4) results in -1 234,5670 €

In a Swiss-French context:

DOLLAR(1234.567) results in SFr. 1'234.57
DOLLAR(1234.567,-2) results in SFr. 1'200
DOLLAR(-1234.567,4) results in SFr. -1'234.5670

In a Norway-Norwegian (Nynorsk) context:

DOLLAR(1234.567) results in kr 1 234,57
DOLLAR(1234.567,-2) results in kr 1 200
DOLLAR(-1234.567,4) results in kr -1 234,5670
end example]