SpreadJS Documentation
DOLLAR
SpreadJS Documentation > Formula Reference > Formula Functions > DOLLAR

This function converts a number to text using currency format, with the decimals rounded to the specified place.

Syntax

DOLLAR(value,digits)

Arguments

This function has these arguments:

Argument Description
value Numeric value to convert to text using the currency format
digits [Optional] Number of decimal places to maintain; if negative, the value is rounded to the left of the decimal point; if omitted, the function rounds to two decimal places

Remarks

This function uses the current regional Windows settings to determine the format of the returned string.

Data Types

Accepts numeric data for both arguments. Returns string data.

Examples

DOLLAR(B5,D2)

DOLLAR(R5C2,R2C4)

DOLLAR(1234.5678,3) gives the result $1,234.568

DOLLAR(123.45,1) gives the result $123.5

See Also