Reputation: 23
I have to create a loop, but the size of this loop have to change according the cell value. But I don't know how to reference a specific cell.
Example - my dataset has 2 rows:
Id value
1 10
2 20
For the first row I have to run this loop 10 times, but for the second row I have to run 20 times.
How I can do this?
Upvotes: 2
Views: 29
Reputation: 11360
How about this:
loop # = 1 to 1000. /*use the maximum number or runs necessary.
do if # <= value.
some transformations.
end if.
end loop.
This will run the transformations on all cases every time, but will stop when the number of required runs for each line is reached.
Upvotes: 1