From: HammerJoe on 15 Dec 2009 20:44 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.
From: HammerJoe on 17 Dec 2009 19:30 On Dec 15, 9:44 pm, "Hammer...(a)gmail.com" <hammer...(a)gmail.com> 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. Any help how I could reference the factors into variables? That is my major hurdle.
From: Dana DeLouis on 17 Dec 2009 23:01 > ... 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, HammerJoe(a)gmail.com 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.
From: HammerJoe on 21 Dec 2009 20:14 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 DeLouis <delo...(a)bellsouth.net> 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, Hammer...(a)gmail.com 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.
From: Dana DeLouis on 21 Dec 2009 20:32
> 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, HammerJoe(a)gmail.com 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 DeLouis<delo...(a)bellsouth.net> 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, Hammer...(a)gmail.com 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. > |