Need VBA Code to tm1 ti
Posted: Thu Apr 25, 2019 4:45 pm
I have this code in vba macro , need to convert in ti
For i = k To n
If k > incFreq Then
myPmt = myPmt * (1 + incRate)
k = 1
End If
discnt = discnt * (1 + discntRate)
escPV = escPV + myPmt / discnt
k = k + 1
Next
Having issue where it says i =k to n , they assign K again as 1 when its greater than incFreq and that should cause a loop .I am getting an endless loop when did using while becasue of K being reassigned ,
While(K<=noOfMonhts);
if(K>IncrementFrequency);
PaymentAmount=PaymentAmount*(1+EscalationRate);
K=1;
ENDIF;
discnt=discnt*(1+discountRate);
escpv=escpv+(PaymentAmount/discnt);
K=K+1;
END;
Is there something I am missing here while converting .
For i = k To n
If k > incFreq Then
myPmt = myPmt * (1 + incRate)
k = 1
End If
discnt = discnt * (1 + discntRate)
escPV = escPV + myPmt / discnt
k = k + 1
Next
Having issue where it says i =k to n , they assign K again as 1 when its greater than incFreq and that should cause a loop .I am getting an endless loop when did using while becasue of K being reassigned ,
While(K<=noOfMonhts);
if(K>IncrementFrequency);
PaymentAmount=PaymentAmount*(1+EscalationRate);
K=1;
ENDIF;
discnt=discnt*(1+discountRate);
escpv=escpv+(PaymentAmount/discnt);
K=K+1;
END;
Is there something I am missing here while converting .