Do I need to use VBA for the following control structure?

C

cfman

Hi all,

I have the following control structure from Matlab, do you think I need VBA
to handle it, or I can just rely on Excel?

Thanks a lot!

-----------------------------------------

for t=1:5;
CumLoss=CumLoss+sum(DefaultTime:), t));

if (CumLoss>TotalNotional*Deattachment)
break;
else
PV=PV+y*(TotalNotional-CumLoss)/(1+r)^t;
if t==5
PV=PV+(TotalNotional-CumLoss)/(1+r)^t;
end;
end;
end;
 
J

Joel

It depends if you want the answer as a single response or you want the answer
in multple cells

I would make a column with t in the first column and number the rows from 0
to 5. the use excel functions to put the answerr in a second column.
 
Top