The COMPLEX function in Excel is designed to convert real and imaginary coefficients into a complex number. This function is particularly useful in fields such as engineering, physics, and applied mathematics, where complex numbers are frequently utilized for computations involving waveforms, electrical engineering calculations, and more.
Syntax
COMPLEX(real_num, imaginary_num, [suffix])
- real_num: This is the real part of the complex number you want to create.
- imaginary_num: This represents the imaginary part of the complex number.
- suffix (optional): This is a text string that specifies the suffix used for the imaginary unit. If omitted, it defaults to “i”.
Example #1
COMPLEX(3, 4)
In this instance, the function combines the real part “3” and the imaginary part “4” to generate the complex number 3 + 4i. The result would be “3+4i”.
Example #2
COMPLEX(5, -2)
The function here takes the real part “5” and the imaginary part “-2” to yield the complex number 5 – 2i. The output is “5-2i”.
Example #3
COMPLEX(2, 3, "j")
This example uses “j” as the suffix for the imaginary unit, producing the complex number 2 + 3j. The result will be presented as “2+3j”.
Error handling
- NUM!: Indicates an issue with the numerical input, typically resulting from an invalid argument for real_num or imaginary_num.
- VALUE!: This occurs if the inputs are not numbers. Ensure both real_num and imaginary_num are valid numeric expressions.
- NAME?: This error signifies that Excel doesn’t recognize the function name, often caused by a typo or incorrectly defined parameters.