View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Evaluate formula

It is possible but very complicated. It is a language parsing problem. The
worksheet formulas have a syntax that must be defined. I would search the
web for a general purpose PARSER.

The solution usualy uses a recursive algorithm to get the individual pieces.
The formulas have parenthesis and you need performa the operations following
the parenthesis.

There are better programming languages to do these tasks than BASIC. SNOBOL
programming language is one of the programming languages is designed to
handle these type problems.

"Dan" wrote:

Hi,
Is it possible via vba to dissect a spreadsheet formula and evualte every
part of it?
I do not need an addin that do it (I thik it exists on the net) - I need to
understand how to do it - so I need to see the code behind the solution.
Many Thanks,
RG