# Dollar function in excel

Dollar function in excel is a specialized function that is used to convert the given value to currency in dollar format. It only introduces dollar symbol with the specified value in the form of numbers. It does not work with characters in the form of alphabets.

We can also say that DOLLAR() function converts the number into the text in the format of dollars.

### Syntax

The DOLLAR can be represented in two ways.

1. DOLLAR(number)
2. DOLLAR(number, [decimals])

DOLLAR(number)

It is declared as:

=DOLLAR(number)

For example,

=DOLLAR(10)

The value returned will be \$10.00.

The default decimal value of DOLLAR is 2. Hence, if we specify any number with or without decimal in the function, it will return the value upto two decimal places.

Let's consider another example.

=DOLLAR(154.5492)

The value returned will be \$154.55.

DOLLAR(number, [decimals])

Here, we can specify the decimal value as per our requirements. It means decimal value as 0 means no decimal with the number, and 3 means value upto three decimal places. We generally prefer specifying the decimal value because we can adjust the decimal places as per our requirements.

It is declared as:

=DOLLAR(number, decimal)

For example,

=DOLLAR(10, 1)

The value returned will be \$10.0.

Or

=DOLLAR(10, 0)

The value returned will be \$10.

## Shortcut method to access the DOLLAR() function

We can access the function either through typing on the selected cell/ formula bar or through the shortcut. In the former case, we need to specify the number and decimal value in the function to convert it into dollar format. But, using the shortcut method, we need to specify the number and the decimal value in the dialog box.

Let's discuss the steps, which are as follows:

1. Select any cell and click on the Formulas bar present on the top of the excel, as shown below: 2. Click on the Text icon, as shown below: 3. A drop-down list will appear. Select the DOLLAR function from the given list, as shown below: 4. A dialog box will appear, as shown below: 5. Specify the number and decimal value in front of the respective option and press OK. The desired value in the form of dollar will appear on the selected cell. It will also appear on the right-corner of the dialog box, as shown below: We can set the value and decimal place as per our requirements.

## Important points

• DOLLAR() function does not work on characters in the form of alphabets, symbols, equations, etc.
• It also accepts 0 as the number and converts it into the text in the dollar format.
For example,
=DOLLAR(0)
Value returned: \$0.00
Or
=DOLLAR(0,0)
Value returned: \$0
• DOLLAR function can also perform mathematical operations declared within the function.
For example,
=DOLLAR(3 + 4, 2)
Value returned: \$7.00
=DOLLAR(3 / 4, 2)
Value returned: \$0.75
=DOLLAR(3 * 4, 2)
Value returned: \$12.00
It will first compute the results and then converts the value into the dollar format.
If the result after the mathematical operations is negative, it will insert parenthesis with the numerical value in the dollar format.
For example,
=DOLLAR(3 - 4, 2)
Value returned: (\$1.00)

## Examples

Let's consider some examples.

### Example 1: To convert the numbers into the decimal formats.

Consider the below steps:

1. Click on the first cell of the Dollar format column and type =DOLLAR(A3, 0), as shown below: The value 0 will insert no decimal with the number.
2. Press Enter. The desired number in the format of dollars will appear on the selected cell, as shown below: The number will be represented with the dollar sign in the form of integers. If the number is in the form of decimal, the function will round off the given value to the nearest integer.
3. Drag and drop down it to the last cell of the column, as shown below: 4. The numbers which are already in the decimal format will be rounded off to the nearest integer value. For example,
1.23 -> \$1
54.2 -> \$54

### Example 2: To convert the price of different commodities with 2 decimal places.

As specified, we will specify the decimal value as 2 to insert two decimal places with the number.

1. Click on the first cell of the Dollar Price column and type =DOLLAR(A3, 2), as shown below: 2. Press Enter. The desired number in the format of dollars will appear on the selected cell, as shown below: If the number has more than two decimal places, the function will round off the given value upto the two decimal places only.
3. Drag and drop down it to the last cell of the column, as shown below: The DOLLAR() function will be applied automatically to the selected cells of the column, as shown below: ### Feedback   