CONVERT Function in ONLYOFFICE Spreadsheet Editor: Units, Prefixes and Practical Examples
Detailed ONLYOFFICE CONVERT tutorial with documented unit tokens, unit families, SI and binary prefixes, worked conversions, error handling and compatibility cautions.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
CONVERT transforms a numeric measurement from one officially recognized unit token into another unit of the same type. It is useful for Canadian/US distances, scientific measurements, temperatures, mass, time, information quantities, or pricing by length. Unit tokens are not display labels: the correct quotation marks and capitalization are essential. Source: official CONVERT reference.
Exact syntax, argument order, types and defaults
=CONVERT(number, from_unit, to_unit)
| Position | Argument | Required type and meaning | Default |
|---|---|---|---|
| 1 | number |
Numeric value to convert (number or numeric cell reference). | Required; no default. |
| 2 | from_unit |
Text string enclosed in quotes identifying original unit token, or cell containing that token. | Required; no default. |
| 3 | to_unit |
Text string enclosed in quotes identifying output unit token, or cell containing that token. | Required; no default. |
All three arguments are required. Tokens for unrelated dimensions cannot be converted (for example, meters to seconds). The official help explicitly says the two units must belong to the same measurement type. It does not specify a universal exact error string for every invalid token or out-of-family combination, so those remain editor test cases.
Important official unit tokens (copy precisely)
| Measurement family | Supported source tokens from the ONLYOFFICE reference | What can go wrong |
|---|---|---|
| Distance | "m" (meter), "mi" (statute mile), "ft" (foot), "in" (inch), "Nmi" (nautical mile) |
"mi" and "Nmi" do not mean the same distance. |
| Mass | "g", "lbm", "ozm", "stone", "ton" |
Pound mass "lbm" differs from pound force "lbf". |
| Time | "yr", "day" or "d", "hr", "mn" or "min", "sec" or "s" |
Don’t use invented "h" for hour. |
| Temperature | "C", "F", "K", "Rank", "Reau" |
Absolute and offset scales require formula-specific conversion, not a generic multiplier. |
| Volume | "l"/"L", "gal", "uk_gal", "cup", "ft3" |
U.S. gallon "gal" differs from U.K. "uk_gal". |
| Speed | "m/s", "mph", "kn", "m/h" |
Exact slash/case and nautical vs statute speed matter. |
| Information | "bit", "byte" |
The SI k prefix differs from binary ki. |
| Area | "m2" or "m^2", "ha", "ft2" |
Area codes differ from distance codes ("m"). |
| Energy | "J", "Wh", "cal", "eV" |
Uppercase/lowercase distinguishes symbols in many families. |
The full official table also lists pressure, force, power, magnetism, and less common engineering units; see the source’s complete unit and prefix registry instead of assuming an unlisted spelling is recognized.
Prefix syntax: decimal versus binary
ONLYOFFICE documents decimal prefixes including k = 10³, c = 10⁻², m = 10⁻³, and M = 10⁶; "km", "cm", "kg" and "mg" are constructed from prefix + permitted base token. Binary prefixes include ki = 2¹⁰, Mi = 2²⁰ and Gi = 2³⁰. Not every prefix/unit combination has been tested in a running editor, and the official reference is the authority on recognized base tokens. Do not interchange "M" and "m" or assume capital "K" means kilo: "K" is listed as Kelvin.
Build a reproducible worksheet
- Create a new blank ONLYOFFICE Spreadsheet Editor workbook. In A1:D1, type Value, From unit, To unit, Result.
- Enter the numeric inputs in column A and the literal unit tokens (without including quote characters in the cell) in B and C as shown below. Example: B2 should contain
mi, not"mi". - Enter
=CONVERT(A2,B2,C2)in D2, and copy the formula down to D15. The directly entered hard-coded equivalents are shown for audit. - Compare the spreadsheet results with the independent expected values, allowing ordinary floating-point rounding or displayed-decimal differences. Any actual discrepancy must be recorded as a native test finding.
| Row | A: Value | B: From unit | C: To unit | D: Formula | Independent expected D value | Explanation |
|---|---|---|---|---|---|---|
| 2 | 1 | mi |
m |
=CONVERT(A2,B2,C2) |
1609.344 | 1 international statute mile = 1,609.344 meters. |
| 3 | 1000 | m |
km |
=CONVERT(A3,B3,C3) |
1 | Metric kilo prefix (10³). |
| 4 | 2500 | g |
kg |
=CONVERT(A4,B4,C4) |
2.5 | Grams into kilograms using documented “k” prefix. |
| 5 | 3 | hr |
mn |
=CONVERT(A5,B5,C5) |
180 | Three hours × 60 minutes per hour. |
| 6 | 1024 | bit |
byte |
=CONVERT(A6,B6,C6) |
128 | Eight bits per byte. |
| 7 | 1 | ft |
in |
=CONVERT(A7,B7,C7) |
12 | Twelve inches in a foot. |
| 8 | 32 | F |
C |
=CONVERT(A8,B8,C8) |
0 | Freezing point in Celsius from Fahrenheit. |
| 9 | 100 | C |
F |
=CONVERT(A9,B9,C9) |
212 | Boiling point at standard reference pressure. |
| 10 | 273.15 | K |
C |
=CONVERT(A10,B10,C10) |
0 | Kelvin origin offset, mathematically expected. |
| 11 | 1 | m |
cm |
=CONVERT(A11,B11,C11) |
100 | Metric centi prefix (10⁻²). |
| 12 | 1 | gal |
l |
=CONVERT(A12,B12,C12) |
3.785411784 | U.S. liquid gallon, not U.K. gallon. |
| 13 | 1 | m/s |
mph |
=CONVERT(A13,B13,C13) |
2.2369362921 | Conversion from m/s to miles per hour, rounded. |
| 14 | 1 | kg |
lbm |
=CONVERT(A14,B14,C14) |
2.2046226218 | Approximate metric mass to pound-mass ratio. |
| 15 | 1 | day |
hr |
=CONVERT(A15,B15,C15) |
24 | 24 hours per day. |
All outputs above are independent conversion expectations, not values seen in ONLYOFFICE. Fractional decimals are shown to approximately 10–12 significant digits; native precision and rendering must be checked. To test a direct literal formula, for example enter =CONVERT(1,"mi","m") in a separate blank cell; its independent mathematical expectation is 1609.344.
Advanced reusable worksheet patterns
Change both unit tokens without rewriting formulas. Store user-supplied numeric amounts in A, input units in B and desired units in C, then use =CONVERT(A2,B2,C2) in D. Copy D down. This helps avoid repeated manual multiplication by hard-coded constants. A controlled list of official tokens in B/C lowers typo risk; validation-list UI behaviour is separate from CONVERT and was not tested.
Temperature is not simple scaling. To interpret Celsius and Fahrenheit, use documented "C" and "F" rather than multiplying Celsius by 1.8 alone; the freezing-point example requires a +32 offset. The independent calculation is C = (F − 32) × 5/9.
Validate inputs before relying on them. Add a separate flag cell such as =IF(A2="","Missing amount","Check units") for user review before conversion. The IF function’s separate official documentation applies; the flag is illustrative and must be checked in the target version. Because CONVERT does not turn a valid mass unit into a time unit, handle category mismatches intentionally rather than treating the result as a valid measurement.
Distinguish physical conventions. The official tokens intentionally distinguish "gal" (U.S. gallon) and "uk_gal" (U.K. gallon), as well as "mi" and "Nmi". For regulated, billing, laboratory or safety-critical applications, confirm the applicable reference standard and measurement tolerance before adopting spreadsheet conversions.
Errors, limits and troubleshooting
| Symptom / input | Source-grounded interpretation | Action |
|---|---|---|
=CONVERT(1,"m","sec") |
Incompatible families; official source forbids unlike measurement types, exact error code not specified here. | Choose compatible units or split problem into separate derived computations. |
Unit token misspelled (e.g. "meter" instead of "m") |
Source lists exact unit codes, not arbitrary English words. | Replace with the documented code; verify capitalization. |
Celsius-to-Fahrenheit result differs from 1.8×C |
Offset required by temperature scales. | Use CONVERT, not a plain multiplicative factor. |
Confusion between "kg" and "Kg" |
Prefix case matters; k is documented for kilo. |
Use the vendor’s exact token "kg". |
| Spreadsheet shows too few decimals | Formatting, not necessarily inaccurate arithmetic. | Increase visible decimal places; check expected tolerance. |
| Source cell contains blank/text in numeric position | Outside the intended numeric number argument. |
Enter a numeric amount; test actual native error if collecting compatibility evidence. |
| Different region or formula language | Regional/locale settings can affect presentation and localized names. | Consult Advanced Settings and confirm formula entry on the actual target edition. |
No maximum accepted magnitude, exact floating-point implementation, or version-specific prefix matrix is established by the cited help page; such limits must remain unverified instead of being guessed.
Related ONLYOFFICE documentation
- CONVERT official unit and prefix table — syntax and admissible tokens.
- IF — use the catalogue to locate the official IF entry before extending validation patterns.
- Inserting functions — function picker and syntax conventions.
- Advanced settings — region, formula language and numeric separators.
Verification and compatibility
This guide is based on the current, unversioned English ONLYOFFICE help pages on 2026-10-13 (UTC) and independent numerical reasoning. The sample values below are expected values, not results observed in a running ONLYOFFICE Spreadsheet Editor. No screenshot, workbook execution, web edition test, Desktop edition test, or historic version support test was performed. Use the official function catalogue.
Edition and compatibility: ONLYOFFICE’s documentation describes the current Docs Spreadsheet Editor; its Desktop changelog and Docs changelog are distinct records. None of the cited function pages establishes a first-supported Desktop or web version for this function; do not infer universal historical compatibility or claim that an XLSX exported to another spreadsheet program evaluates identically. Where a function returns an array, the current ONLYOFFICE array-entry guide explicitly describes selecting the complete output range, entering the formula and pressing Ctrl+Shift+Enter. Do not manually type the surrounding { }. In some editions, dynamic-array behaviour may differ and must be tested.
Formula language and separators: The examples use English names, A1-style references, a decimal point, and commas between arguments. The official function-entry guide shows these conventions. The Advanced Settings guide documents configurable formula language, region and numeric separators; it does not provide a verified translation or formula argument separator for every locale. Change regional settings as appropriate and verify the resulting formula entry in the target edition rather than blindly substituting commas with semicolons.
Claim-level evidence, checked 2026-10-13 UTC
| Claim | Official source | Evidence classification |
|---|---|---|
| Three required arguments and their order | CONVERT reference | Documentation verified |
| Token spellings and measurement families | CONVERT reference | Documentation verified |
| Decimal and binary prefixes | CONVERT reference | Documentation verified |
from_unit and to_unit must be compatible |
CONVERT reference | Documentation verified; exact native error string not claimed |
| English formula entry, cell references, commas | Function entry | Documentation verified |
| Formula language / region settings | Advanced Settings | Documentation verified |
| First-supported web/Desktop version | Docs releases; Desktop releases | Unverified; do not extrapolate from current reference |
| Numerical values in 14 example rows | Independent unit-constant calculations | Mathematical expectations only; no native execution |