Related Topics: | ||
Description: Converts a number to text using currency format, with the decimals rounded to the specified place. The format used is $#,##0.00_);($#,##0.00).
Syntax: DOLLAR(Number, Decimals)
Number is a number, a reference to a cell containing a number, or a formula that evaluates to a number.
Decimals is the number of digits to the right of the decimal point. If Decimals is negative, number is rounded to the left of the decimal point. If you omit Decimals, it is assumed to be 2.
Remarks:
The major difference between formatting a cell that contains a number with the Custom Number command (Sheet Options > Format and View > Custom Number) and formatting a number directly with the DOLLAR function is that DOLLAR converts its result to text. A number formatted with the Custom Number command is still a number. You can continue to use numbers formatted with DOLLAR in formulas, because the software converts numbers entered as text values to numbers when it calculates.
Example:
DOLLAR(1234.567, 2) = "$1,234.57" [the first in a currency format, 2 digits to the right of the decimal point]
DOLLAR(1234.567, -2) = "$1,200" [the first in a currency format, 2 digits to the left of the decimal point]
DOLLAR(-1234.567, -2) = "($1,200)" [the second number in a currency format, 2 digits to the left of the decimal point]
© 1992-2013. ReliaSoft Corporation. ALL RIGHTS RESERVED.