DOLLAR Function (OpenOffice Calc)
Format currency text with Apache OpenOffice DOLLAR. Check decimal rounding, locale-specific symbols and why the returned string is different from number formatting.
Verification status: Eight ordinary currency-text formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using generated ODF. Saved identities, typed results and controls were checked. Locale was English (USA), default currency USD; other locales were not tested. How formula examples are checked
Quick answer: =DOLLAR(1234.567) returned the text "$1,234.57" with English (USA) locale and default USD currency.
Availability and version history
- Introduced: First release not established; documented by OpenOffice.org 3.3.
- Supported in: Apache OpenOffice 4.1.16; no final supported release is established.
- Scope: English desktop Calc with semicolon-separated formulas. The observed locale was English (USA), default currency USD.
- Checked: October 14, 2026. Eight ordinary examples were recalculated in 4.1.16 on Linux x86-64, Build 9816. Saved types, strings or numeric values, and both controls were checked.
What DOLLAR returns
DOLLAR rounds a number and returns text using the application’s standard currency format. Its name does not guarantee a US-dollar symbol in every locale. The exact observed currency text and the independently rounded numeric amount are shown separately. Release implementation.
Syntax and arguments
=DOLLAR(Number[;Decimals])
- Number: numeric value to format.
- Decimals: optional decimal precision, default 2. The source floors the argument and accepts it from −15 through 15.
A negative precision rounds to positions left of the decimal point; the formatted result then has no fractional digits.
Reproducible examples
All eight formulas were recalculated. The middle column is a numeric reference; the final column is the saved string. Quotation marks delimit the text here and are not part of the cell value. Exact symbols and separators are scoped to the observed English (USA), default USD settings.
| Formula | Independently rounded amount | Saved 4.1.16 text |
|---|---|---|
=DOLLAR(1234.567) |
1234.57 |
"$1,234.57" |
=DOLLAR(1234.567;0) |
1235 |
"$1,235" |
=DOLLAR(1234.567;2) |
1234.57 |
"$1,234.57" |
=DOLLAR(1234.567;-1) |
1230 |
"$1,230" |
=DOLLAR(-1234.567;2) |
-1234.57 |
"-$1,234.57" |
=DOLLAR(12.5;0) |
13 |
"$13" |
=DOLLAR(-12.5;0) |
-13 |
"-$13" |
=DOLLAR(0;2) |
0.00 |
"$0.00" |
Practical worksheet
With two decimals, 1234.567 rounds to 1234.57. With zero decimals it rounds to 1235. With precision −1 it rounds to the nearest ten, 1230; it does not mean one digit after the decimal point.
The ordinary tie examples 12.5 and −12.5 at zero decimals round to 13 and −13. The sign decoration and currency symbol in the resulting text are formatting decisions of the observed locale, separate from these numeric rounding results.
Advanced interpretation and checks
For nonnegative numbers the source applies a floor after adding one half at the chosen scale. For negative numbers it uses the corresponding ceiling after subtracting one half, giving the stated away-from-zero tie direction for these exact ordinary examples.
If a worksheet must continue calculating with the amount, retain the numeric value and use a cell currency format for presentation. DOLLAR returns a string. Re-parsing that string elsewhere can depend on the destination locale’s currency, grouping and decimal rules, so a successful visual display is not a portable data-interchange contract.
Boundaries and troubleshooting
The release checks the allowed decimal-precision interval; no out-of-range precision was executed. The native examples do not establish rounding at every binary floating-point tie or every very large amount.
The displayed symbol, thousands separator and negative pattern belong to the saved application locale. They are not exchange-rate information, and changing them does not convert the amount into another currency. The source chooses the standard currency format; it does not accept a currency-code argument. Use an explicitly identified conversion calculation when monetary units actually need changing.
Related functions
Official evidence and checking scope
The generated ODF was opened in the native application, hard-recalculated and saved separately. Its informational “Not all attributes could be read” load warning was retained. Both stale and uncached SUM controls refreshed correctly. The original XLSX was not executed, and this generated-ODF test does not establish manual entry or execution in another release or locale.