DOLLAR


Returns text representing a number in your currency format according to the regional setting you set for the form or web page.

Syntax:

DOLLAR(number, decimals)

returns text representing number as currency. decimals (optional, assumed to be 2 if omitted) sets the number of decimal places.

Example:

DOLLAR(255)

returns $255.00, if your currency is US dollars.

DOLLAR(367.456, 2)

returns $367.46, if your currency is US dollars.


Application:

Creating a Sales Report


Imagine you are a small business owner preparing a sales report. You have a list of products and their total sales, and you want to present this data clearly, with the sales figures formatted as currency.


Table:

Product

Total Sales (Raw Number)

Total Sales (Formatted with DOLLAR)

A
B
C
1
Laptop
2549.998
$2,550.00
2
Keyboard
150.25
$150.25
3
Monitor
550
$550.00
4
Mouse
45.751
$45.75
5
Webcam
99.99
$99.99

The Total Sales column contains raw numbers. To make them easier to read and understand as monetary values, you can use the DOLLAR function. The function takes two arguments:

  1. number: The value you want to format. This can be a direct number, a cell reference, or a formula.
  2. decimals: (Optional) The number of decimal places you want to display. If you omit this, the function defaults to 2. You can also use a negative number to round to the left of the decimal point.


Applying the DOLLAR function in a new column (Column C):

To format the "Total Sales" values, you would enter the following formula in cell C2 and then enter it to the other cells:

DOLLAR(B1, 2)

  • B1: This is the cell reference for the first number you want to format (2549.998).
  • 2: This tells the function to round the number to two decimal places.


As you can see from the table, the DOLLAR function has done the following:

  • Added the currency symbol ($) to the beginning of each number.
  • Added a thousands separator (,) for the number greater than 999.
  • Rounded the numbers to two decimal places, as specified in the formula. For example, 2549.998 was rounded up to 2550.00.
  • Converted the number into a text string. This is an important distinction. While it looks like a number, the output of the DOLLAR function is a text string. This means you cannot use it directly in other mathematical calculations.




This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof