DOLLAR Function in ONLYOFFICE Spreadsheet Editor: Syntax and Examples
Format a numeric amount as currency text with DOLLAR; check regional settings and avoid accidental text arithmetic.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: The original introduction version and date are not established by the official sources checked.
- Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final working-version endpoint is established.
- Scope: Docs and Desktop Editors release separately. This unversioned help does not establish availability in every older build, mobile client or deployment.
- Checked: October 14, 2026, against the official function reference. Documentation and independent example checks; no native application test.
Quick answer
Use =DOLLAR(number, [decimals]) to turn a numeric amount into currency-formatted text; when decimals is omitted, the official default is 2. For example, in a US-English currency configuration, =DOLLAR(1234.567) is expected to display text resembling $1,234.57. This is not a numeric result you should pass directly into totals. ONLYOFFICE’s DOLLAR reference confirms the purpose, argument names and default; locale-specific punctuation is not fully specified there.
When DOLLAR is useful—and when it is not
Use this function to assemble readable prices, invoices, exported notes or display-only summary labels. It is not a currency converter: it does not apply an exchange rate. It turns a number into formatted text. If you need a sortable or summable amount, keep the original numeric cell and apply the Spreadsheet Editor’s currency cell formatting instead.
Exact documented syntax
=DOLLAR(number, [decimals])
| Argument | Required? | Meaning | Example |
|---|---|---|---|
number |
Required | Number to present as currency text. | A2 or 1234.567 |
decimals |
Optional | Number of decimal places to display. | 0, 1, 2; omitted → 2 |
There is one required argument and one optional argument. The function reference does not establish the behaviour of negative decimal-place counts, error coercion or binary midpoint ties for each ONLYOFFICE build; do not import Microsoft-specific guarantees without native tests. It also does not define every locale’s sign, grouping or currency-symbol placement. Official function page.
Locale and number formatting
The examples use English formula names and comma-separated arguments. Advanced settings control formula language and region. In the pinned official source, DOLLAR requests a regional currency format and falls back to a dollar format when none is obtained. This supports checking local symbols and punctuation rather than assuming one universal output string. The checked source is a May 19, 2026 SDKJS snapshot, not a guarantee for every installation.
Reproducible practice worksheet
Enter the following as numbers, not quoted text:
| Cell | Type | Enter | Reason |
|---|---|---|---|
| A1 | Text | Amount | Column heading |
| A2 | Number | 1234.567 | General amount |
| A3 | Number | 20 | Whole currency unit |
| A4 | Number | 0 | Zero |
| A5 | Number | 2500.127 | Separate rounded price |
| A6 | Number | -18.23 | Negative value for local-format inspection only |
| A7 | Number | 159.99 | Positive value near next whole unit |
For the illustrative output strings below, select English formula language and English (United States) region with period decimals, comma grouping and an ordinary $ display, then verify the cell’s effective currency behavior. The displayed strings illustrate that configuration; another region can use different symbols, spacing or grouping.
Enter the result formulas
Keep A2:A7 unchanged. Enter the formulas below into B2:B11 with a leading equals sign. Compare the numeric rounding first, then inspect the currency symbol, grouping and negative-value format in your installation.
Worked formulas and expected results
| Enter in | Formula | Expected (US-English scenario) | Why |
|---|---|---|---|
B2 |
=DOLLAR(A2) |
$1,234.57 |
Two decimal places by default; US-English illustrative display |
B3 |
=DOLLAR(A2,1) |
$1,234.6 |
One decimal place (US-English illustrative) |
B4 |
=DOLLAR(A2,0) |
$1,235 |
Whole-unit currency text (no exact-half input) |
B5 |
=DOLLAR(A3,0) |
$20 |
Integer amount without decimals |
B6 |
=DOLLAR(A4,0) |
$0 |
Zero formatted as text |
B7 |
=DOLLAR(A5,2) |
$2,500.13 |
Grouping and 2-decimal rounded display |
B8 |
=DOLLAR(A7,0) |
$160 |
Rounding a non-midpoint to whole currency unit |
B9 |
=ISTEXT(DOLLAR(A2)) |
TRUE | Text result of DOLLAR |
B10 |
=ISNUMBER(DOLLAR(A2)) |
FALSE | Currency-formatted text is not numeric |
B11 |
=LEN(DOLLAR(A4,0)) |
2 |
Two displayed characters for $0 in the specified US-English scenario |
The ISTEXT and ISNUMBER checks provide an important audit: a formatted number looks financial but becomes text. If currency output varies in a target build, inspect numeric arguments separately before concluding that a calculation is wrong.
More advanced applications
Keep numeric sales totals and show a formatted label separately
Keep the original numeric amount 1234.567 in A2, then use =DOLLAR(A2,2) in B2 as a display-only label. Sum A2 and other original numeric cells, not the results of the DOLLAR formulas. The DOLLAR output is text by definition. Official DOLLAR and ISNUMBER.
Build a readable status sentence
="Current invoice total: "&DOLLAR(A2,2)
Expected under the specified locale: Current invoice total: $1,234.57. The concatenation produces a display label, not a numeric total. Be aware that changes to formula language, region or locale-specific currency signs may change the appearance of the label.
Choose formatting rather than a DOLLAR result for calculations
If the same amount must later be added, filtered as numeric or charted, prefer the original number in A2 and an applied currency display format. Only use DOLLAR in the presentation or export column. Related formatting function: TEXT; numeric formatting function: FIXED. These functions have different signatures and must not be treated as aliases.
Common mistakes, limits and troubleshooting
- Numbers no longer sum: DOLLAR returns text. Keep a numeric copy and use number formatting for the numeric workflow.
- Wrong currency symbol or grouping: the Regional Settings controls formula language, region and separators. A DOLLAR label is not an exchange-rate conversion or a guarantee of Canadian-dollar notation.
- Different rounding from a displayed cell: compare the original numeric amount, the optional
decimalsand the desired precision. Avoid assuming every midpoint behaves identically across applications; if needed, check with ROUND in the target build. - Negative amount looks different: account for currency negatives, parentheses and sign placement; the ONLYOFFICE function article does not fix one universal rendering. In
A6, compare the native result with the expected numeric magnitude, but record its exact text as observed after checking the displayed result. #NAME?or formula displayed literally: confirm the function is available in the installed build and is entered as an English formula (or use your translated Formula Language setting). Use the Insert Function dialog.- Unexpected decimal separators: ensure source cells are numeric, not text from imports. See NUMBERVALUE for deliberately interpreting regional numeric text.
- Unsupported corner cases: the official DOLLAR article specifies the two arguments and default 2, but does not explicitly promise handling of negative decimal-place counts,
TRUE, arrays or error values. Their full target-version behavior remains unverified here.
Frequently asked questions
Does DOLLAR actually convert USD into CAD? No. It formats a numeric input as currency text. No rate or currency-code argument exists in the documented syntax.
Why does SUM ignore my prices? The result is text. Leave amounts numeric for arithmetic, and create DOLLAR labels in a separate column only when you need text.
How many decimal places does it use automatically? The documented default is two, unless you supply decimals.
Can I rely on $ everywhere? No. Output appearance depends on locale and installation. Record the actual rendered output in your target edition during native review.