I'm not sure equation builder will cooperate with vba very well, but if you can sort out the math/coding on your own, you can definitely program new functions into excel. A quick example would be a quadratic formula UDF:
Function QuadraticFunc(Aval As Long, Bval As Long, Cval As Long)
Dim Ans1, Ans2 As double
Ans1 = ((Bval * -1) + WorksheetFunction.ImSqrt((Bval ^ 2) - (4 * Aval * Cval))) / 2 * Aval
Ans2 = ((Bval * -1) - WorksheetFunction.ImSqrt((Bval ^ 2) - (4 * Aval * Cval))) / 2 * Aval
QuadraticFunc = Ans1 & " or " & Ans2
End Function
=QuadraticFunc(1,6,8) representing x^2 + 6x + 8 returns a value of "-2 or -4"
Bookmarks