What is DOLLAR function in Excel?
DOLLAR function is one of TEXT functions in Microsoft Excel that converts a number to text using currency format, with the decimals rounded to the number of places you specify. DOLLAR uses the $#,##0.00_);($#,##0.00) number format, although the currency symbol that is applied depends on your local language settings.
Syntax of DOLLAR function
The DOLLAR function syntax has the following arguments:
- Number: A number, a reference to a cell containing a number, or a formula that evaluates to a number.
- Decimals(Optional): The number of digits to the right of the decimal point. If this is negative, the number is rounded to the left of the decimal point. If you omit decimals, it is assumed to be 2.
DOLLAR formula explanation
Generally, you should use the Format Cells dialog (Ctrl+1) or Home > Number > Accounting Number Format option to apply a currency formatting to a cell. This is because the DOLLAR function returns the number provided as text. Numbers stored as text are a common cause of spreadsheet errors, because many functions ignore them, such as SUM, AVERAGE, MIN, MAX, etc.
Example of DOLLAR function
Steps to follow:
1. Open a new Excel worksheet.
2. Copy data in the following table below and paste it in cell A1
Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.
You can adjust the column widths to see all the data, if need be.
|=DOLLAR(A1,2)||Displays the first number in a currency format, 2 digits to the right of the decimal point.|
|=DOLLAR(A2,-2)||Displays the second number in a currency format , 2 digits to the left of the decimal point.|
|=DOLLAR(A3,4)||Displays the third number in a currency format, 4 digits to the right of the decimal point.|
|=DOLLAR(A4)||Displays the fourth number in a currency format, 2 digits to the right of the decimal point.|