Repeated application of Solver to new equations
The general solutions to a* x^2+b*x+c==0 is...
= (-b - Sqrt(b^2 - 4*a*c))/(2*a)
= (-b + Sqrt(b^2 - 4*a*c))/(2*a)
Would that help?
Solver would give only 1 solution. The two solutions to your example
(2*x^2 - 5*x + 1) would be:
0.2192235936
2.280776406
HTH
--
Dana DeLouis
Win XP & Office 2003
"John Cordes" wrote in message
...
I'm trying to help a friend with this one. He has about 5,000 equations,
which for the sake of discussion can be taken of the form
2*x^2 - 5*x + 1.
The multiplicity of equations comes about because each eqn. has a
different coefficient of the linear term in x. So the picture is something
like this: there is a column of (say) 5000 values of the linear
coefficient - in column A, say. Column B holds the quadratic, using the
linear coefficient from Col. A.
What he wants to do is to repeatedly apply Solver to all these equations
in turn. I am (very) weak in VBA, but this simple macro/program (basically
obtained by recording) does work ok, interactively, for one equation:
Sub Solve()
SolverOk SetCell:="$E$2", MaxMinVal:=3, ValueOf:="0", ByChange:="$B$2"
SolverSolve
End Sub
Would anyone have any ideas which would help to streamline the process of
obtaining the solution of 5000 such equations?
Thanks very much for any advice,
John Cordes
|