DOLLAR()

Syntax. DOLLAR(number,decimals)

Definition. This function converts numbers into text and uses the currency format. The name of the function and the assigned currency symbol depend on the country settings. The decimal places are rounded according to the decimal places specified for the conversion. The default format is $#,##0.00;–$#,##0.00.

Arguments

  • number (required). A numeric value, a reference to a cell that contains a number, or a formula that returns a number

  • decimals (optional). The number of digits after the decimal point

    • If the decimal places are negative, the number of digits to the left of the decimal point are rounded.

    • If no decimal places are indicated, two decimal places are used.

Background. The difference between the Format/Cells command on the Number tab and the DOLLAR() function is that DOLLAR() converts a numeric value into text. A number formatted with the Format/Cells command is still a numeric value.

Despite this difference, you can use numbers converted with the DOLLAR() function in other formulas, because for calculations, Excel converts numbers displayed as text values into numeric values.

When you are using the DOLLAR() function to display numbers, it is important to remember that numbers displayed as text will extend into the next cell if the numbers are too large for the column width, or they might be truncated. Values that are formatted as numeric will display ### if the cell width is unable to accommodate the width of the number.

Example. Assume that you want to ensure that a price column used for a mail merge in Microsoft Word is not changed. For this reason, you use the DOLLAR() function to convert the values in the price column into the corresponding currency text in a calculated column. The calculated column is used for the mail merge process in Word. Here are some other examples:

  • =DOLLAR(12.56) returns $12.56.

  • =DOLLAR(38612.60,-1) returns $38,610.

  • =DOLLAR(12.56,0) returns $13.

  • =DOLLAR(38612.60,-2) returns $38,600.

  • =DOLLAR(12.46,0) returns $12.

  • =DOLLAR(38612.60,-3) returns $39,000.

  • =DOLLAR(PI(),3) returns $3.142.

  • =DOLLAR(38612.60,-4) returns $40,000.

See Also

FIXED(), T(), TEXT(), VALUE()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.46.92