The formula used to divide a complex number a+bi by a complex number c+di is:
Complex Numbers are explained in detail on the Wikipedia Complex Numbers Page.
The Excel IMDIV function calculates the quotient of two complex numbers (i.e. divides one complex number by another).
The format of the function is:
where the inumber arguments are Complex Numbers, and you want to divide inumber1 by inumber2.
Note that complex numbers are simply stored as text in Excel. When a text string in the format "a+bi" or "a+bj" is supplied to one of Excel's builtin complex number functions, this is interpreted as a complex number.
Also the complex number functions can accept a simple numeric value, as this is equivalent to a complex number whose imaginary coefficient is equal to 0.
Therefore, the inumber arguments can be supplied to the Excel Imdiv function as either:
In the spreadsheet below, the Excel Imdiv function is used find the difference between different pairs of complex numbers.
Formulas:
 Results:

Note that, in the above example spreadsheet:
Note that the example in cell B4 of the above spreadsheet uses the Excel Complex Function to create complex numbers.
Further information on the Excel Imdiv function are provided on the Microsoft Office website.
If you get an error from your Excel Imdiv function this is likely to be one of the following:
#NUM!    Occurs if either:

#VALUE!    Occurs if either of the supplied inumber arguments are logical values. 