Contact

IMSUB in ONLYOFFICE: Subtract Two Complex Numbers

Engineering Intermediate ONLYOFFICE Spreadsheet Editor

Use ONLYOFFICE IMSUB to subtract complex values in the correct order. Recreate examples, analyze differences and troubleshoot input problems.

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 check; not a new native test.

Quick answer

Subtract a second complex number from a first one. The argument order matters. The current ONLYOFFICE vendor reference documents the English formula =IMSUB(inumber1, inumber2). Its function group is Engineering. It was checked on 2026-10-13 UTC. Square brackets mark optional arguments in syntax descriptions; do not type those brackets in actual formulas.

Verification boundary: Vendor documentation establishes name, purpose, syntax and described input forms. Every stated mathematical result is independently calculated using complex-number algebra; no formula was executed in ONLYOFFICE Docs or Desktop Editors. Formatting, errors, locale syntax and version-specific runtime compatibility still require native checks.

Exact syntax, argument types, order and defaults

=IMSUB(inumber1, inumber2)
Argument Required? Official meaning and expected type Default
inumber1 Yes The complex value from which the second value is subtracted. None
inumber2 Yes The complex value being subtracted from the first. None

The input operands are complex numbers such as 3+4i or 2-3j, represented as complex-number text produced by COMPLEX or entered in the documented form. A numeric cell containing just a real component is not a replacement for both components without an explicit COMPLEX construction. There are no undocumented optional flags, fallback values or implicit defaults in this syntax. A formula begins with =; the examples below use English function names and commas in accordance with ONLYOFFICE’s Insert Functions instructions.

Recreate the entire worksheet from scratch

Create a new empty spreadsheet. Enter the following exact values in A1:F9: A is the scenario label, B and C the real and imaginary parts of z₁, D and E the real and imaginary parts of z₂, and F the lower-case imaginary-unit label. Put headings in row 1; enter the eight data records in rows 2–9. B:E must contain numbers, not text strings with an i/j suffix.

Row A: Scenario B: real z₁ C: imag z₁ D: real z₂ E: imag z₂ F: unit Mathematically z₁ Mathematically z₂
2 Sensor reading 3 4 1 -2 i 3+4i 1-2i
3 Opposite quadrants -2 5 4 1 i -2+5i 4+i
4 Purely real 6 0 -3 0 i 6 -3
5 Imaginary only 0 2 0 -1 i 2i -i
6 Signed pair -3 -4 2 -1 i -3-4i 2-i
7 Electrical j notation 2 3 -1 2 j 2+3j -1+2j
8 Zero divisor check 1 1 0 0 i 1+i 0
9 Symmetric pair 1 1 1 -1 i 1+i 1-i
  1. In G1 write z₁ (complex) and in H1 write z₂ (complex). Enter =COMPLEX(B2,C2,F2) in G2 and =COMPLEX(D2,E2,F2) in H2. These use ONLYOFFICE COMPLEX with the two numeric coefficients and a lowercase unit suffix.
  2. Fill both G2 and H2 down through row 9. In I1, type IMSUB result. In I2, type =IMSUB(G2,H2), and fill I2 down to I9.
  3. Interpret results as mathematical complex numbers. An editor may omit a zero term or render a coefficient of one differently. This article intentionally does not claim a particular exact textual serialization. Compare real/imaginary components where appropriate with IMREAL and IMAGINARY.
  4. To reproduce the examples without any reference file, retain the input table, select another blank location for advanced formulas, and change one argument at a time. None of these calculations requires screenshots, macros, external data or paid services.

Expected mathematical outputs for each row

Input row Enter in I-row Independently calculated expected value Why
2 =IMSUB(G2,H2) 2+6i Second complex value subtracted from first.
3 =IMSUB(G3,H3) -6+4i Second complex value subtracted from first.
4 =IMSUB(G4,H4) 9 Second complex value subtracted from first.
5 =IMSUB(G5,H5) 3i Second complex value subtracted from first.
6 =IMSUB(G6,H6) -5-3i Second complex value subtracted from first.
7 =IMSUB(G7,H7) 3+j Second complex value subtracted from first.
8 =IMSUB(G8,H8) 1+i Second complex value subtracted from first.
9 =IMSUB(G9,H9) 2i Second complex value subtracted from first.

Reproducibility check: In row 2, z₁ = 3+4i and z₂ = 1−2i. The derivation is: Subtract the corresponding components: (a+bi)−(c+di)=(a−c)+(b−d)i. Reversing operands reverses both differences. The expected output in the row-2 table is a mathematical prediction, not a screenshot or confirmed ONLYOFFICE return string. To inspect numeric components separately, use =IMREAL(I2) and =IMAGINARY(I2) in unused cells; this is a proposed native check, not an executed one.

Why the formula works

Subtract the corresponding components: (a+bi)−(c+di)=(a−c)+(b−d)i. Reversing operands reverses both differences.

For a before-and-after electrical signal, =IMSUB(G2,H2) represents the change between 3+4i and 1−2i, yielding a mathematically expected 2+6i. Change order only when you intentionally redefine the reference direction. The two-dimensional difference is not the same as the difference of magnitudes.

If source measurements carry volts, ohms or other units, attach those units to the header labels. Complex-number cells should contain parsable complex numbers rather than strings such as 3+4i volts, which are not documented as valid formula inputs.

Advanced uses: Signal deltas, sign reversals and error measurements

Enter each expression in an unused cell, with the same G:H inputs created above. The formula is shown alongside its independent, mathematical expected value; it has not been run in the ONLYOFFICE application.

Advanced formula Expected mathematical value What it teaches
=IMSUB(G2,H2) 2+6i First signal minus the second.
=IMSUB(H2,G2) -2-6i Reverse the order: the difference changes sign.
=IMSUB(G2,COMPLEX(0,0,"i")) 3+4i Subtracting complex zero leaves the original.
=IMSUB(G2,G2) 0 The difference of an operand with itself is zero.
=IMSUM(IMSUB(G2,H2),H2) 3+4i Add the subtracted operand back to recover the starting value.
=IMSUB(G7,H7) 3+j Compare two j-suffixed impedances.
=IMSUB(IMCONJUGATE(G2),G2) -8i Conjugate minus original isolates minus twice the imaginary component.

Read this correctly: the expressions show compositional mathematical identities, not proof of native formula evaluation for a particular release. A single complex number has two mathematical components; comparing display strings is less robust than validating both components numerically. Decimal fractions may be rounded by the editor’s display precision.

A reproducible practical application

To detect the difference between an observed phasor G2 (3+4i) and a reference H2 (1−2i), use =IMSUB(G2,H2) for the expected error vector 2+6i. =IMSUB(H2,G2) instead expects −2−6i—the reverse direction. If the goal is the size of this difference, nest the formula in IMABS, e.g. =IMABS(IMSUB(G2,H2)), whose mathematical expectation is sqrt(40) ≈ 6.3245553203; this numeric prediction is not a confirmed displayed value.

Common errors, limitations and troubleshooting

1. Difference is the opposite of expected. Check that the first argument is the minuend and the second is the subtrahend. First review the exact input cells and argument order; if the error persists, retain the formula and installed build number in the research record.

2. Treating subtraction as component extraction. IMSUB returns a complex difference; use IMREAL or IMAGINARY to inspect components. First review the exact input cells and argument order; if the error persists, retain the formula and installed build number in the research record.

3. Formula with an omitted second argument. The official syntax requires both inumber1 and inumber2; no optional argument is documented. First review the exact input cells and argument order; if the error persists, retain the formula and installed build number in the research record.

Invalid complex syntax: 3+4k, a measurement unit embedded in a complex operand, accidental spaces, missing quotes around literal text, or uppercase I/J are not established by the documented x+yi/x+yj input form. Do not invent an ONLYOFFICE error code; test on an identified build. Try =COMPLEX(3,4,"i") to construct a clean operand, then pass its cell reference to the function.

Zero components / display conventions: 0+2i, 2i, 2j, and 0 may be formatted or simplified differently from the pedagogical display in these tables. Verify underlying mathematical components; the short vendor help page does not fully define output normalization. Do not assume a particular sign, absence of 1, zero prefix or decimal digit count in the returned text.

Wrong data types and local formula settings: When formulas show as literal text, verify that the cell is not formatted as Text and that the formula begins with =. Keep B:E numeric. If your localized editor expects translated function names or semicolons, use the built-in Function Arguments window rather than indiscriminately replacing commas. The source reference is English; cross-language parsing was not tested.

Precision, extreme operands and platform differences: Finite-precision arithmetic may make comparisons of fractional outputs approximate. The vendor article for this function does not establish a numeric tolerance, an exhaustive overflow behaviour table, an earliest supported software version or an identical web/desktop error response. Preserve the difference between mathematical undefined results, actual native #...! errors and help-documentation checks.

Diagnostic sequence when a formula fails

  1. Open a new blank file, set B2=3 and C2=4 as numbers, then enter =COMPLEX(B2,C2,"i") into G2.
  2. Verify B2/C2 are numeric and G2 uses the explicit lowercase "i" suffix from step 1.
  3. For a two-operand function, create H2 with =COMPLEX(1,-2,"i"). For IMSUM/IMPRODUCT, start with just the first operand before adding more.
  4. Enter the relevant formula from the first row of the worked table exactly. If the formula assistant shows different translated names or separators, follow its regional convention.
  5. Use IMREAL and IMAGINARY for numerical component checks when supported; record exact software/host build and observed error text.
  6. Do not treat independently computed values shown here as successful application test results.

ONLYOFFICE interface, language and version compatibility

According to the official Spreadsheet Editor Insert Functions guide, functions can be entered directly from the formula bar, reached from the Home/Formula tabs or selected in the Function Arguments dialog. For this family choose Formula → More functions → Engineering, or search the exact function name. That English guide says formula arguments are separated by commas. The Advanced Settings guide documents formula language and regional controls; therefore the text of a formula in a localized installation may differ. Do not assume Excel, Google Sheets or another spreadsheet program establishes ONLYOFFICE execution or translation.

Edition distinction: The primary function reference is on the current unversioned ONLYOFFICE Docs Spreadsheet Editor Help Center. Documentation listing is not proof that any particular deployed Docs web server or Desktop Editors build executes the function, nor proof that the feature existed in historical versions. Docs release history and Desktop Editors release history are separate. Neither the first-supported Docs version nor the first-supported Desktop Editors version has been verified for IMSUB; no version-compatibility table or feature parity should be inferred from the article title. For deployment-specific compatibility, test an identified web or desktop version, including localized syntax and edge-case errors.

Verification notes

Verification: Official syntax and inputs were checked against the linked vendor references. All table and advanced examples were independently calculated with exact complex arithmetic. Native ONLYOFFICE Docs and Desktop execution was not performed. Error messages, output serialization and localized or historical compatibility remain unverified.