The DOLLAR function in Google Sheets is a powerful tool used for formatting numbers as currency according to specific locale settings. This function is particularly helpful for presenting financial data in a standardized way, ensuring clarity and consistency across various reports and analyses. By utilizing this function, users can enhance the legibility of numeric values, aligning them with regional currency formats.
Syntax
DOLLAR(number, [decimals])
- number: The numeric value you want to format as currency.
- decimals: (Optional) The number of decimal places to display. If omitted, Google Sheets defaults to 2 decimal places.
Example #1
DOLLAR(1234.567)
This function formats the number 1234.567 into a currency format, resulting in: $1,234.57.
Example #2
DOLLAR(1234.567, 1)
Here, the function formats 1234.567 to display 1 decimal place, leading to: $1,234.6.
Example #3
DOLLAR(98765, 0)
In this example, the value 98765 is formatted as a currency with no decimal places, resulting in: $98,765.
Error handling
- VALUE!: This error occurs if the input for ‘number’ is not a valid numeric value.
- NUM!: This error shows up if the ‘decimals’ parameter is less than zero or not an integer.