[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

COMPLEX

Syntax:

COMPLEX ( real-number , imaginary-number [ , suffix ] )

Description: Makes a complex number in x + yi or x + yj text format from the arguments.

Arguments:

Name

Type

Description

real-number

number

The real number coefficient.

imaginary-number

number

The imaginary number coefficient.

suffix

text

"i" or "j". If omitted, "i" is used.

 

Return Type and Value: text – The complex number string specified by the arguments.

If real-number has the value 0 and imaginary-number has a non-zero value, the resulting string contains just the real number. If real-number has a non-zero value and imaginary-number has a zero value, the resulting string contains just the imaginary number and suffix. If both real-number and imaginary-number have a zero value, the resulting string is "0".

However, if suffix is neither "i" nor "j", #VALUE! is returned.

[Example:

COMPLEX(-3.5,19.6) results in -3.5+19.6i
COMPLEX(3.5,-19.6,"j") results in 3.5-19.6j
COMPLEX(3.5,0) results in 3.5
COMPLEX(0,2.4) results in 2.4i
COMPLEX(0,0) results in 0

end example]