Thread: Step back
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Weng-Kit Tan Weng-Kit Tan is offline
external usenet poster
 
Posts: 2
Default Step back

How do you translate this into vba code?

for i = (N-1) downto 0 do
for j = 0 to i do
C[j] = disc * ( p*C[j+1] + (1-p)*C[j] )

1.
Particularly the part about "downto", so instead of running i from 0
to (N-1), this is a step-back running from (N-1) to 0.

2.
How do you make the Function remember each individual value C[j] from
j = 0 to i