ID EN
#Engineering

COMPLEX

Excel Functions

Get the string representation of a complex number

Syntax

EXCEL
=COMPLEX(real_num, i_num, [suffix])

Arguments

Parameter Description
real_num The real part of the complex number.
i_num The imaginary part of the complex number.
suffix [optional] The suffix for the imaginary unit, either "i" or "j".

Return Value

The string representation of a complex number

Details

The COMPLEX function returns the string representation of a complex number. For example: To use the "j" instead of "i": To enter the value of a complex number without using the COMPLEX function, write it in a formula like this: The Excel formula engine handles complex numbers as strings formatted like "x+yi" or "x+yj". For example, when we add two complex numbers together using the IMSUM function, the complex numbers are passed to the function as strings, and the result is a string representing the complex number that is the sum. We can perform the same operation using COMPLEX to get the strings representing the complex numbers.

Examples

Example 1

The COMPLEX function returns the string representation of a complex number. For example:

EXCEL
=COMPLEX(4,3) // returns "4+3i"
Example 2

To use the "j" instead of "i":

EXCEL
=COMPLEX(4,3,"j") // returns "4+3j"
Example 3

To enter the value of a complex number without using the COMPLEX function, write it in a formula like this:

EXCEL
="4+3i"
Explanation

The Excel formula engine handles complex numbers as strings formatted like "x+yi" or "x+yj". For example, when we add two complex numbers together usi

EXCEL
=IMSUM("4+3i","2-5i") // returns "6-2i"
Explanation

We can perform the same operation using COMPLEX to get the strings representing the complex numbers.

EXCEL
=IMSUM(
COMPLEX(4, 3),
COMPLEX(2,-5)
) // returns "6-2i"

See Also

IMREAL IMAGINARY IMABS IMARGUMENT