Excel - DOLLAR Function



DOLLAR Function

The Excel DOLLAR function transforms a numeric value into text in a currency format. The currency symbol depends on the system's preferred language settings. It is listed under the Excel TEXT function category. Sometimes, the number formatting is lost when merging the text with the quantitative value that contains a dollar sign. To resolve this challenge, you can wrap the cell reference in the TEXT or DOLLAR functions to retain the number formatting while concatenating it with text.

Compatibility

This advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016

Syntax

The syntax of the DOLLAR function is as follows −

DOLLAR (number, [decimals])

Arguments

You can use the following arguments with the DOLLAR function −

Argument Description Required / Optional
Number It specifies a numeric value/cell reference/formula for computation. Required
Decimals

It indicates the number of digits displayed after the floating point.

A number is rounded to the left of the decimal point in case of a negative decimal.

If you omit decimals, it is assumed to be 2.

Optional

Points to Remember

  • The main core difference between a DOLLAR Function and the cell formatting with a Ribbon is that DOLLAR straightforwardly converts its resulting value to a string.
  • In the Format Cells dialog box, the number formatting must be a number.
  • The currency number format: #,##0.00_);(#,##0.00) is utilized by the DOLLAR function to transform a numeric value into the text.
  • If you specify the text or special symbols other than numeric values in any of its arguments, then the DOLLAR function will receive #VALUE! Error.
  • A similar function is the TEXT function, which gives you better scalability while evaluating the expression.

Examples of DOLLAR Function

Practice the following example to use the DOLLAR function in Excel.

Example 1: How to Execute the DOLLAR Function in Excel?

The DOLLAR function is used to convert a numeric value into text, formatted as currency.

Solution

Step 1 − First, assume the sample table consists of three columns: random Numbers, Decimals, and Function Usage.

How to execute the DOLLAR function in Excel 1

Step 2 − After that, double-click on the D2 cell and enter the formula =DOLLAR([@[Random Numbers]],C2).

How to execute the DOLLAR function in Excel 2

Furthermore, press the Enter tab, which will automatically populate the resulting value in the range D2:D8 cells.

how_to_execute_the_dollar_function_in_excel 3

As you can notice in the screenshot, the result in the D8 cell is #VALUE! Error, as the "Decimals" value is "one" and not numerically defined in the C8 cell. Ensure that the decimal arguments should contain a nonnegative value.

Example 2: Wrapping Text with Numbers

Solution

Let's say you wish to combine Quarterly sales with a dollar figure. If you use the simple ampersand sign, the currency formatting will diminish.

To overcome this issue, place the cursor on the C3 cell, double-click on it, enter the formula "=B3 & DOLLAR(34.54)", and hit the Enter tab.

Wrapping Text with Numbers 1

Wrapping Text with Numbers 2

Therefore, the text is successfully combined with the numeric value with the DOLLAR sign.

Download Practice Sheet

You can download and use the sample data sheet to practice the DOLLAR function.

Advertisements