Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract complex equations from a string

Status
Not open for further replies.

JTBorton

Technical User
Jun 9, 2008
345
DE
I'm looking for a method to extract complex math formulas from a string. Range classes have the Formula property, but is simply a variant. I'm not sure how excel is interpretting the equation. I would like to feed in a complex formula and recognize both excel built in functions, and user defined functions. I'd like to be able to feed in differential equations (eventually), integration operators, as well as complex polynomials, logarithmic and power functions, and trigonometric functions. It would also be useful for Simpon's Rule integration. This feature would be used for more complex solvers. Im curious as to how to organize the mathematical operators, variables, coefficients and constants.

Can anyone point me in the right direction? I have a few ideas, but I'd like to see how others have done it. When I do a search, all I can find are string functions and excel worksheet functions.

I know there are other math programs available, such as mathcad, matlab, polymath, etc. The formulas in this case would be for simpler means, and wouldn't need as large of a scope.

-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 
I might also note that part of the reason i want to do it myself, rather than using math programs, is for the learning experience.

-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
 


Hi,

Please post some examples of data that you have and what you expect to do with each.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
The Excel "Eval" function will do what you want, except it won't recognise user defined functions. You can find a spreadsheet with a UDF using this technique to evaluate integrals here:


If you follow the links from that post and/or search the site for "eval" you will find several other examples.

If anything isn't clear please ask, either here or at the blog.

Doug Jenkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top