IMSUM
Returns the sum of one or more complex numbers.
Adds real parts together and imaginary parts together.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=IMSUM(inumber1, [inumber2], ...)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
inumber1 | any | Required | — |
inumber2 | any | Optional | — |
Accepts a variable number of arguments. Minimum: 1.
Return type
Can return text.
How it works
Add corresponding components to get (a + c) + (b + d)i. An additional argument adds its real and imaginary coefficients independently.
Differences from Excel
The raw Formualizer text can contain more significant digits than Excel’s complex-number text. The examples round each coefficient to 15 significant digits for display.
Remarks
- Each argument is coerced to complex-number text before parsing.
- Accepts any number of arguments from one upward.
Error cases
- Invalid complex text returns
#NUM!.
Examples
Add the real and imaginary coefficients of 3 + 4i and 1 + i.
Formula =IMSUM("3+4i","1+i")
Expected result 4+5i
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Add two to the real coefficient while leaving the imaginary sum fixed.
Formula =IMSUM("3+4i","1+i","2")
Expected result 6+5i
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
With one operand, the sum is the input itself.
Formula =IMSUM("3+4i")
Expected result 3+4i
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
An operand that cannot be parsed as complex causes an error.
Formula =IMSUM("3+4i","invalid")
Expected result #NUM!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Add multiple complex values
Formula =IMSUM("3+4i","1-2i","5")
Expected result 9+2i
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Add j-suffix values
Formula =IMSUM("2j","-j")
Expected result j
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Can IMSUM take more than two arguments?
Yes. It is variadic and sums all provided complex arguments in sequence.