View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default How to do check for factors in formulas?

So how do I assign variables to the factors and use them?

Hi. If I understand the question correctly, you extract a string, and
want to assign a value to this string.
One way that comes to mind might be to use a Dictionary Object.
The 'Key' would be the string variable, and the item the desired value.
It could work for simple things, but it might be messy with 9 equations,
and 9 unknowns. Hopefully, someone will have a better idea.

= = = = =
Dana DeLouis


On 12/21/09 8:14 PM, wrote:
Possibly,
But I intend to limit the range to 1 to 9 for example.
'CD' would not be a variable per se because it is in fact 'C' and 'D'
combined together.
So if A+B=CD then the 'C' in C+D+E=A will be the same as the 'C' in
'CD'.

So how do I assign variables to the factors and use them?

On Dec 18, 12:01 am, Dana wrote:
... find the values for A,B,C,D and E that satisfy the two formulas.


Hi. I may be wrong, but at the basic level, you will have two
equations, with 6 variables (if 'CD' is a variable.)
There would be an unlimited number of solutions.

= = = = = = = = = =
Dana DeLouis

On 12/15/09 8:44 PM, wrote:



I need help creating a function.


The goal is to parse formulas from cells A1 to A5 and find the values
of each factor.
Example:
A1 - "A+B=CD"
A2 - "C+D+E=A"


*Notice the double digit in the first formula.
In this example the macro needs to parse these two rows and find the
values for A,B,C,D and E that satisfy the two formulas.


The idea behind this function is to be able to type simple formulas in
several rows and have the macro calculate whatever the different
factors are that satisfy all the formulas.


Any help would be appreciated on how to do this.