Here is the thing:

I am trying to write a quadratic equation solver in Excel 2003 using Vba, creating my own formula, but I cannot figure out how to get it to display the complex roots. This is the formula, just for the first root. It is going to be the same for the second one, just changing the signs where I have to:

Function quad1(a, b, c)

If IsNumeric(a) And IsNumeric(b) And IsNumeric(c) Then

If ((b ^ 2) - (4 * a * c)) >= 0 Then
quad1 = Format((((-b) + (Sqr((b ^ 2) - (4 * a * c)))) / (2 * a)), "0.00")

Else:
quad1 = ((-b) / (2 * a)) & (i * ((Sqr(-((b ^ 2) - (4 * a * c)))) / (2 * a)))

End If
Else
quad1 = "Input a numeric value"
End If
End Function


The part that I have to fix is:
quad1 = ((-b) / (2 * a)) & (i * ((Sqr(-((b ^ 2) - (4 * a * c)))) / (2 * a)))
Any suggestions are welcome. Thanks !