E
Evan
Hi,
I'm writing a formula that will automate excels goal seek
functionality. That is, I want to type a formula =iterate(C2, 25.2),
which will return a value in the called cell, so that the value in C2
gets closer to 25.2. The calculation option will be set to iterate,
so that the sheet continues to calculate until some convergence
parameter is met.
In order to do this I need to declare several static variables or
names to store the past values of the calling cell, C2, and a
convergence parameter. Because this function could be called from
many cells in the same worksheet, the variable names need to be
different for each cell that it is called from.
So, I need to be able to do something like this:
stringName = "hello" & "world"
static [stringName] as single
helloworld = 5#
and then have the variable helloworld hold the value indefinitely
Alternatively, If I could do
Names.Add Name:=strName RefersTo:=3#
Names(strName).Value = 5#
And then be able to recall the value as Names(strName).Value, that
would work.
I have not been able to do either of these successfully.
If anyone could suggest a workaround, or the correct syntax for either
of these methods (I don't think they can be used though), that would
be very helpful.
I'm writing a formula that will automate excels goal seek
functionality. That is, I want to type a formula =iterate(C2, 25.2),
which will return a value in the called cell, so that the value in C2
gets closer to 25.2. The calculation option will be set to iterate,
so that the sheet continues to calculate until some convergence
parameter is met.
In order to do this I need to declare several static variables or
names to store the past values of the calling cell, C2, and a
convergence parameter. Because this function could be called from
many cells in the same worksheet, the variable names need to be
different for each cell that it is called from.
So, I need to be able to do something like this:
stringName = "hello" & "world"
static [stringName] as single
helloworld = 5#
and then have the variable helloworld hold the value indefinitely
Alternatively, If I could do
Names.Add Name:=strName RefersTo:=3#
Names(strName).Value = 5#
And then be able to recall the value as Names(strName).Value, that
would work.
I have not been able to do either of these successfully.
If anyone could suggest a workaround, or the correct syntax for either
of these methods (I don't think they can be used though), that would
be very helpful.