Automatically increase a number using if/then???


Posted by Paul Bain on October 30, 2001 12:26 PM

How do you automatically increase a number using if/then.

For example, I want to increase a number (N) by .01 until the sum of N and another number equals a third number.

How do you automatically increase N by .01. Example 500.01, 500.02, 500.03... until N + 200 = 800?



Posted by Aladin Akyurek on October 30, 2001 12:49 PM

Paul,

In B1 enter: Intial value of N (i.e., your 500)
In B2 enter: The value of DELTA (the increment, i.e., your 0.01)
In B3 enter: The value that must be added to N (i.e., your 200)
In B4 enter: Criterion value that must be achieved (i.e., your 800)

In A1 enter: =IF(B1,IF(B2,B1+B2,""),"")
In A2 enter: =IF(LEN(A1),IF(A1+$B$3<=$B$4,A1+$B$2,""),"")

Copy down the formula in A2 as far as neede.

Aladin

=========