ukdane
05-02-2011, 02:57 AM
I need a formula which I can use with an if statement.
I'll try and explain.
I have a loop, where each loop X increases by one.
within the loop if x reaches a multiple of 20 (-1) then it should do something
So for the first series of loops (1-19) nothing happens
as soon as the loop hits 20 something should happen.
then the loops continue until it hits 39 ... the same thing that happened at 20 should occur, again at 58, 77, 96, and so on and so forth....
x=1
do until x = y+1
If x= 20, 39, 58,77,96 (etc etc) then 'this it the line that needs to be "forumlated"
dothis
else
donothing
end if
dosomething
x=x+1
loop
Thanks for your help.
I'll try and explain.
I have a loop, where each loop X increases by one.
within the loop if x reaches a multiple of 20 (-1) then it should do something
So for the first series of loops (1-19) nothing happens
as soon as the loop hits 20 something should happen.
then the loops continue until it hits 39 ... the same thing that happened at 20 should occur, again at 58, 77, 96, and so on and so forth....
x=1
do until x = y+1
If x= 20, 39, 58,77,96 (etc etc) then 'this it the line that needs to be "forumlated"
dothis
else
donothing
end if
dosomething
x=x+1
loop
Thanks for your help.