totn Excel Functions

MS Excel: How to use the COMPLEX Function (WS)

This Excel tutorial explains how to use the Excel COMPLEX function with syntax and examples.

Description

The Microsoft Excel COMPLEX function converts coefficients (real and imaginary) into a complex number. The complex number can be in either form, x + yi or x + yj.

The COMPLEX function is a built-in function in Excel that is categorized as an Engineering Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the COMPLEX function can be entered as part of a formula in a cell of a worksheet.

Syntax

The syntax for the COMPLEX function in Microsoft Excel is:

COMPLEX( real_coefficient, imaginary_coefficient, [suffix] )

Parameters or Arguments

real_coefficient
The real coefficient of the complex number.
imaginary_coefficient
The imaginary coefficient of the complex number.
suffix
Optional. It is either "i" or "j" which is to represent the suffix for the imaginary component of the complex number. If suffix is omitted, it assumes that suffix is "i".

Returns

The COMPLEX function returns a string/text value.
If real_coefficient is not a numeric value, the COMPLEX function will return a #VALUE! error.
If imaginary_coefficient is not a numeric value, the COMPLEX function will return a #VALUE! error.
If suffix is not either "i" or "j", the COMPLEX function will return a #VALUE! error.
If suffix is entered in uppercase (ie "I" or "J" instead of "i" or "j"), the COMPLEX function will return a #VALUE! error.

Applies To

  • Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007

Type of Function

  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel COMPLEX function examples and explore how to use the COMPLEX function as a worksheet function in Microsoft Excel:

Microsoft Excel

Based on the Excel spreadsheet above, the following COMPLEX examples would return:

=COMPLEX(A2,B2)
Result: "3+5i"

=COMPLEX(A2,B2,"i")
Result: "3+5i"

=COMPLEX(A2,B2,"j")
Result: "3+5j"

=COMPLEX(A3,B3)
Result: "2+i"

=COMPLEX(A3,B3,"i")
Result: "2+i"

=COMPLEX(A3,B3,"j")
Result: "2+j"