Groups > WordPerfect Office > QuattroPro X3 > Re: interation - trial and error




interation - trial and error

interation - trial and error
Wed, 9 Apr 2008 08:20:34 -0700
I have 3 cell say A1, A2 and A3
A1 is a seed, start value of 5
A2 is a calulation of A1, using Vlook in a table.
A3 is the Difference between A1 and A2

if A3 is larger then 0.5, then A1 is replace with A2
so on until A3 condition is met.

I need to do this for two hundred rows.

Some help using macro or funtion would be great. 


Post Reply
Re: interation - trial and error
Wed, 09 Apr 2008 10:52:14 -060
fillmore wrote:
> I have 3 cell say A1, A2 and A3
> A1 is a seed, start value of 5
> A2 is a calulation of A1, using Vlook in a table.
> A3 is the Difference between A1 and A2
> 
> if A3 is larger then 0.5, then A1 is replace with A2
> so on until A3 condition is met.
> 
> I need to do this for two hundred rows.

Redesign you structure from "A1,A2,A3" to "A1,B1,C1":

A1:  5
B1:  @VLOOKUP(A1,table,1)
C1:  A1-B1

Then set up your iterations row-wise:

A2:  @IF(C1>0.5,B1,"stop")
B2:  @IF(A2,@VLOOKUP(A2,table,1),"stop")
C2:  @IF(A2,A2-B2,"stop")

Copy A2..C2 down as far as you need.

Cheers,
Uli
Post Reply
Re: interation - trial and error
Wed, 09 Apr 2008 20:38:53 GMT
Fillmore:
> I need to do this for two hundred rows.
>
It is not clear how the initial three-Cell range is extended 
into the other 197.
-- 
Good wishes!
Roy Lewis
C_Tech volunteer
(UK)

Post Reply
about | contact