There are some Excel formula syntax parsers around, although I have not seen
one that copes with Excel 2007 and Excel 2010 Table syntax.
See for instance
http://ewbi.blogs.com/develops/2007/...formula_p.html
http://vangelder.orconhosting.net.nz/
I guess you already know that parameters involving expressions are already
evaluated when they are passed in the Paramarray to the calling function ...
Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com
"Jim Luedke" wrote in message
...
P.S.
My example was a bad one because it didn't highlight the difficulty of
parsing a formula string.
In fact in my example x()'s params were easily parsed. Just strip off
the leading "=" and outer parens, locate the commas, and you're done.
I.e.:
=x("abc",123,y(999),z(y(999)))
yields:
"abc"
"123"
"y(999)"
"z(y(999))"
The difficulty lies in **nested calls of functions with 2 or more
params**.
Using the same logic on this string:
=x("abc",123,y(999,"xyz"),z(101,y(999,"xyz")))
results in this mess:
"abc"
"123"
"y(999
"xyz)"
"z(101"
"y(999"
"xyz))"
or some such thing.
So it sher would be a great thing if Excel could do this for us.
***