I wonder if anyone has a faster solution to this. I have an array about 100 items. I want to do a calculation to each item and then I want to sum the items starting at the bottom. Is there a faster way to do this?
redim q (1 to 100)
redim x (1 to 100)
redim y (1 to 101)
a=1
b=100
for i = a to b
x(i) = 1 - q(i-1)
next i
y(101) = 0
for i = b to a step -1
y(i) = x(i) + y(i+1)
next i
redim q (1 to 100)
redim x (1 to 100)
redim y (1 to 101)
a=1
b=100
for i = a to b
x(i) = 1 - q(i-1)
next i
y(101) = 0
for i = b to a step -1
y(i) = x(i) + y(i+1)
next i