ONLYOFFICE N Function: Convert Values into Numeric Results
Understand how ONLYOFFICE N returns numeric values, converts TRUE and FALSE, handles dates and text, and preserves errors.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =N(A2) returns a number representing the value in A2, following ONLYOFFICE’s documented type rules. An existing number stays the same, TRUE becomes 1, FALSE becomes 0, a date becomes its numeric date serial, ordinary text becomes 0, and an error remains an error. Do not use N as a text-to-number parser: a cell containing text "120" is not treated like the numeric value 120 by this function.
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 check; not a new native test.
Syntax and argument
=N(value)
| Argument | Required? | Purpose |
|---|---|---|
value |
Yes | Value or cell reference to convert to a numeric result according to its existing type. |
There is one required argument. No optional arguments or default values are documented. The official N reference lists result categories by type. It does not provide a universal promise for every imported data type or every locale-specific date representation.
Conversion reference table
| Input type | What the ONLYOFFICE reference says N returns | Example and expected result |
|---|---|---|
| Number | The same number | =N(12.5) → 12.5 |
| Negative number | The same number | =N(-7) → -7 |
| Logical TRUE | 1 |
=N(TRUE()) → 1 |
| Logical FALSE | 0 |
=N(FALSE()) → 0 |
| Plain text | 0 |
=N("Open") → 0 |
| Numeric-looking text | 0 when treated as text |
=N("120") → 0 |
| Date value | Underlying date serial | =N(A10) with a date in A10 → that date’s serial |
| Error value | Same error | =N(1/0) → #DIV/0! |
| Other values not otherwise classified | 0 as summarized in the official help |
Test unusual imported types natively |
These are expected results from documented type mapping, not native ONLYOFFICE observations. The exact date serial varies with the workbook date system; the reference alone is insufficient to state a single correct numeric date serial for every workbook.
Reproducible worksheet example
Create the following worksheet entries. Column B tests each A cell using =N(A2) copied down to B8.
| Row | Cell A entry | Cell B formula | Expected B result |
|---|---|---|---|
| 2 | 12.5 |
=N(A2) |
12.5 |
| 3 | -7 |
=N(A3) |
-7 |
| 4 | =TRUE() |
=N(A4) |
1 |
| 5 | =FALSE() |
=N(A5) |
0 |
| 6 | ="120" |
=N(A6) |
0 |
| 7 | ="Open" |
=N(A7) |
0 |
| 8 | =1/0 |
=N(A8) |
#DIV/0! |
A6 deliberately contains a formula producing a text string, not a number. This example tests the documented N type mapping; it is not a test of numeric-text parsing from an external database import. A8 intentionally produces an error to demonstrate that N does not silently suppress errors.
Date example without assuming a universal serial number
In A10, enter:
=DATE(2024,1,1)
In B10, enter:
=N(A10)
B10 is expected to hold the workbook’s numeric serial for January 1, 2024. Format B10 as a number if it inherits a date format. No fixed serial number is asserted here, because date systems and date-format settings require confirmation in the target workbook. For text such as "2024-01-01", N’s ordinary-text rule does not promise correct date parsing.
Advanced example: distinguish errors before numeric type conversion
When incoming values can be errors, use a clear review label rather than allowing errors to pass unnoticed:
=IF(ISERROR(A2),"Investigate source error",N(A2))
If A2 evaluates to an error, the expected label is Investigate source error. If A2 is TRUE, the expected result is 1. This is a triage example, not a complete data-validation solution: N("120") still produces 0 rather than 120, potentially hiding numeric-text quality problems. If the goal is parsing numeric text, use an appropriately validated conversion workflow instead; consult the official VALUE documentation and local numeric formats rather than assuming N will parse it.
For a numeric-status summary, it may be more informative to inspect type first:
=IF(ISNUMBER(A2),"Already numeric","Review value type")
This distinguishes existing numeric values from other types, but it does not perform conversion. An error input may need a separate ISERROR branch, as shown above.
Source-backed conversion controls: zero can have several origins
The pinned ONLYOFFICE N routine preserves number and error objects, converts Booleans through their numeric conversion method, and returns numeric zero for other scalar types. It does not run a general numeric-text parser. A single-cell reference is dereferenced first. These branches corroborate the documented difference between numeric 120 and the string "120", including empty strings and genuine empty-value objects.
Create NumericOrigins, with room through E9. Enter the values below in A2:A8. Keep A7 truly cleared. Fill B2 =N(A2), C2 =ISNUMBER(A2), D2 =ISERROR(A2) and E2 =IF(C2,"Already numeric",IF(D2,"Source error","Converted or discarded")) through row 8.
| Row | A entry | Expected B | Expected C | Expected D | Expected E |
|---|---|---|---|---|---|
| 2 | 120 |
120 | TRUE | FALSE | Already numeric |
| 3 | ="120" |
0 | FALSE | FALSE | Converted or discarded |
| 4 | =TRUE() |
1 | FALSE | FALSE | Converted or discarded |
| 5 | =FALSE() |
0 | FALSE | FALSE | Converted or discarded |
| 6 | ="" |
0 | FALSE | FALSE | Converted or discarded |
| 7 | leave cleared | 0 | FALSE | FALSE | Converted or discarded |
| 8 | =NA() |
#N/A | FALSE | TRUE | Source error |
The four zero outputs have different origins: numeric-looking text, FALSE, empty text and an empty cell. The output alone cannot recover which type was supplied. The error remains an error; N is not an error-replacement function.
Advanced: avoid a deceptively plausible total
On a separate QuantityImport, enter numeric 120 in A2, the formula ="120" in A3 and numeric 0 in A4. Fill B2 =N(A2) and C2 =IF(ISNUMBER(A2),"Numeric input","Review source") through row 4. Expected B is 120, 0, 0, while C is Numeric input, Review source, Numeric input. =SUM(B2:B4) is independently expected to give 120.
If A3 was intended to be a quantity of 120, that total is incomplete even though it contains no error. Preserve the text in A3, resolve its intended meaning and locale separately, then test an explicit conversion in another column. Changing A3 to a real numeric 120 on a copy raises the total to 240 and clears the type warning. This comparison uses simple independent arithmetic, not a native parser test. Dates, imported specialized types and arrays keep their separate verification limits.
Evidence date and scope: The fixed source revision above was retrieved and inspected on October 15, 2026. Cached Help Center references retain their stated October 13–14, 2026 checks. The isolated JavaScript tests use synthetic value/reference types; they do not execute a formula parser, complete calculation engine, workbook or graphical editor. No released-build mapping is inferred from the source commit.
Troubleshooting
| Unexpected observation | Why it may happen | Recommended step |
|---|---|---|
"120" becomes 0 |
The value is text, not a number | Check data type and use a validated parsing method when appropriate. |
TRUE becomes 1 |
Documented logical conversion | Keep Boolean meaning in mind when summing results. |
| A date displays as a serial number | Spreadsheet dates are stored numerically | Review number format and workbook date system. |
#DIV/0! remains an error |
N preserves errors | Diagnose upstream formula; N is not IFERROR. |
| Imported data behaves differently from the examples | Mixed types or locale-specific text formats | Test real sample records in the target edition. |
| An empty or unusual value maps unexpectedly | Vendor page does not spell out every coercion | Avoid relying on unspecified edge cases before native tests. |
N vs. VALUE: N is a type-mapping utility, not a general numeric parser. N vs. ISNUMBER: ISNUMBER returns a Boolean type test, whereas N returns a number or an error. Do not replace data-quality checks with N() merely because it always produces a number for ordinary text.
ONLYOFFICE versions, platforms and locale
The current English vendor reference documents N’s behaviour but does not identify the first supported version, a Desktop-versus-browser behaviour matrix, or the effects of every workbook date-system setting. The official Formula tab guide describes formula entry in online and desktop editors; that alone does not prove feature parity in all releases. Examples use English function names and comma-separated arguments in DATE/IF helpers. Locale-specific separators and imported date-text parsing must be checked in a real ONLYOFFICE installation. Cross-compatibility with other spreadsheet software is not guaranteed by this source review.
Official sources and verification trail
- ONLYOFFICE N reference — value types, Boolean conversion, date serials, text mapping and preserved errors. Accessed 2026-10-13 UTC.
- ONLYOFFICE Insert Function catalogue — N listed as an Information function. Accessed 2026-10-13 UTC.
- ONLYOFFICE Formula tab instructions — general editor UI, not proof of version-specific behaviour. Accessed 2026-10-13 UTC.
Verification limits: Official rules and every displayed example were independently checked. No native ONLYOFFICE execution or localized formula test was performed. Historical release support, undocumented coercion and any array/date-system boundaries noted above remain untested.