Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
2 years ago

Is it possible to generate a calculation loop?

Good morning, could you please help me with generating a calculated column which generates a calculation loop

The next expression is the one I need to generate as a loop
For i = 1 To VR
Period = Cant_Cuotas - VR+ i
Amortizacion_Capital = PPmt(Rate, Period, Cant_Cuotas, Capital) * -1
Next i
End Function
The data in my table

CreditNumberCant_CuotarateCapitalVR
11111212010.00011
22221012015.0008
33331512225.000012

5 Replies

  • This should be possible with PRODUCTX.  What is your expected outcome?

  • What I need is to calculate the "Present value" of some operations which I need to perform a loop calculation according to the number of quotas that the operation has, to be more specific I can attach the macro with which that calculation was made in excel.

    Function Calculo_VA_FINMES(Cant_Cuotas, Capital, Vida_Remanente, Valor_Cuota, Tasa, Primer_Vencimiento, Fecha_Venta, tasa_P) As String
    Amortizacion_Capital = 0
    Cycle = Vida_Remanente
    V_act = 0
    days = 0
    days = Primer_Vencimiento - Fecha_Venta
    sum = 0
    Tasa_P_cal = tasa_P / 100 * 1.21 / 365 * 30

    For i = 1 To Ciclo
    Periodo = Cant_Cuotas - Vida_Remanente + i

    Amortizacion_Capital = PPmt(Tasa_P_cal, Period, Cant_Cuotas, Capital) * -1

    Interes_S_IVA = (Valor_Cuota - Amortizacion_Capital) / 1.21

    cuota_S_IVA = Amortizacion_Capital + Interes_S_IVA

    V_act = cuota_S_IVA * (1 + (Tasa * 30 / 365)) ^ -(dias / 30)

    The number = suma + V_act

    Fecha_Vencimiento = WorksheetAction.EoMonth(Primer_Vencimiento, i)

    What I need is to know how I could reconcile that looping calculation of the FOR expression since I have the rest of the data in columns




  • What I need is the loop that takes out the difference between VR and ODDS AMOUNT and adds up the quota amount taken from the difference obtained previously.

    CreditNumberCant_CuotaCapitalVR
    11111210.00011
    22221015.0008
    33331525.000012