Skip to main content

IMDIV

Returns the quotient of two complex numbers.

Syntax​

expression.IMDIV(arg1, arg2);

expression - A variable that represents an ApiWorksheetFunction class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe complex numerator or dividend in the x + yi or x + yj form.
arg2RequiredApiRange | ApiName | numberThe complex denominator or divisor in the x + yi or x + yj form.

Returns​

number

Example​

Divide one complex number by another in a spreadsheet.

// How do I divide two complex numbers in a spreadsheet?

// Get the quotient of complex numbers in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.IMDIV("-2+2.5i", "0.1+1.5j"));