Hi all,
I am tyring to do a simple(atleast thats what I thought) code.
I have a drop down which calculates the principal payments based on the cashflow period specified in the drop down.
The drop down has 3 items,
Monthly
Quaterly and Yearly
Here is my code
Sub DropDown706_Change()
' Paydown dropdown
Dim lngLast_Row As Long
Dim lngRow As Long
lngLast_Row = Worksheets("Detail").Range("B" & Rows.Count).End(xlUp).Row
'Dropdown selections
Select Case Worksheets("Detail").Range("AmortizationPeriodDropDown")
Case "2" ' Quaterly Cashflow
Worksheets("Detail").Range("B38:B398").Value = "" 'Converts the value to null
For lngRow = 39 To lngLast_Row Step 2
Worksheets("Detail").Activate
Range("b39").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]<(TERM*12),-PPMT(RATE/4,RC[-1],AMORT_PERIOD,AMOUNT),AMOUNT-SUM($B$38:RC))"
Next
End Select
End Sub
I am including only the qtrly option code. This gives me an error 1004 object undefined error in formulaR1c1 code.
Appreciate your help
appz
I am tyring to do a simple(atleast thats what I thought) code.
I have a drop down which calculates the principal payments based on the cashflow period specified in the drop down.
The drop down has 3 items,
Monthly
Quaterly and Yearly
Here is my code
Sub DropDown706_Change()
' Paydown dropdown
Dim lngLast_Row As Long
Dim lngRow As Long
lngLast_Row = Worksheets("Detail").Range("B" & Rows.Count).End(xlUp).Row
'Dropdown selections
Select Case Worksheets("Detail").Range("AmortizationPeriodDropDown")
Case "2" ' Quaterly Cashflow
Worksheets("Detail").Range("B38:B398").Value = "" 'Converts the value to null
For lngRow = 39 To lngLast_Row Step 2
Worksheets("Detail").Activate
Range("b39").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]<(TERM*12),-PPMT(RATE/4,RC[-1],AMORT_PERIOD,AMOUNT),AMOUNT-SUM($B$38:RC))"
Next
End Select
End Sub
I am including only the qtrly option code. This gives me an error 1004 object undefined error in formulaR1c1 code.
Appreciate your help
appz