View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Luedke Jim Luedke is offline
external usenet poster
 
Posts: 43
Default Can one function get another's ParamArray?

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.

***