Convert a number to text in currency format
=DOLLAR(number, decimals)
| Parameter | Description |
|---|---|
number |
The number to convert. |
decimals |
The number of digits to the right of the decimal point. Default is 2. |
The DOLLAR function takes two arguments, number and decimals. Number is the number to format, decimals controls how the number is rounded and specifie
=DOLLAR(169.49) // returns "$169.49"
=DOLLAR(169.49,2) // returns "$169.49"
=DOLLAR(169.49,0) // returns "$169"
One use of the DOLLAR function is to concatenate a formatted number to a text string, since number formatting is lost during concatenation. For exampl
="The price is "&A1 // returns "The price is 99"
With the DOLLAR function, formatting can be maintained:
="The price is "&DOLLAR(A1) // returns "The price is $99.00"