Converts a number to text using the currency format, with the decimals rounded to the specified place.
ฟังก์ชันนี้ทำงานใน Google Sheets เหมือนกับใน Excel — ไวยากรณ์และอาร์กิวเมนต์เดียวกัน
DOLLAR(number, [decimals])The DOLLAR function formats a number as currency and converts it into a text string. It is useful for displaying values in reports where you want to maintain specific decimal precision while treating the result as text rather than a numeric value.
=DOLLAR(1234.567, 2)ผลลัพธ์: $1,234.57
Converts the number to currency format and rounds it to two decimal places.
It returns a text string, which means you cannot perform mathematical calculations on the result directly.