The TO_DOLLARS function in Google Sheets is a handy utility for converting numeric values into a dollar format. It is especially useful for financial reports or budgeting spreadsheets where a clear monetary representation is vital for readability and accuracy.
Syntax
TO_DOLLARS(value, [format])
- value: The numeric value you want to convert to dollars.
- format: (Optional) A boolean that determines if the result should display in a specific dollar format. Default is TRUE.
Example #1
TO_DOLLARS(1500)
This function call converts the number 1500 into a dollar value, resulting in “$1,500.00”.
Example #2
TO_DOLLARS(1500, FALSE)
By setting the format to FALSE, this function returns “1500” without any dollar symbol or formatting, which is useful for raw data needs.
Example #3
TO_DOLLARS(-1500)
This will convert the negative number -1500 into a dollar format, resulting in “-$1,500.00”, clearly showing a financial loss.
Error handling
- VALUE!: This error occurs when the value parameter is non-numeric or cannot be interpreted as a number.
- REF!: This error appears when the function is referencing a cell that no longer exists.
- NUM!: This indicates that the value is too large or small to be represented in the dollar format.