How to Find RD Muture value (Yearly,Half yearly,Quarterly, Monthly) UserPageVisits:22 active 80 80 DaniWeb 561 60 2020-07-30T15:49:23+00:00 https://www.daniweb.com/programming/software-development/code/523429/how-to-find-rd-muture-value-yearly-half-yearly-quarterly-monthly

How to Find RD Muture value (Yearly,Half yearly,Quarterly, Monthly)

Gurbachan

'call it like
List1.Clear
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 12)
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 2)
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 4)
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 1)

22 Views
About the Author
code snippet
Function RDMature(P As Double, Rate As Double, TimePeriod As Double, Y1H2Q4M12 As Integer) As String
Dim NakliRate As Double, NakliTime As Double, Amount As Double
Select Case Y1H2Q4M12
Case 1
NakliRate = 0.01 * Rate / Y1H2Q4M12: NakliTime = TimePeriod * Y1H2Q4M12
Amount = P * 12 * (1 + NakliRate) * ((1 + NakliRate) ^ NakliTime - 1)
RDMature = Round(Amount / (NakliRate), 2) & " Yearly"
Case 2
NakliRate = 0.01 * Rate / Y1H2Q4M12: NakliTime = TimePeriod * Y1H2Q4M12
Amount = P * 6 * (1 + NakliRate) * ((1 + NakliRate) ^ NakliTime - 1)
RDMature = Round(Amount / (NakliRate), 2) & " Half Yearly"
Case 4
NakliRate = 0.01 * Rate / Y1H2Q4M12: NakliTime = TimePeriod * Y1H2Q4M12
Amount = P * 3 * (1 + NakliRate) * ((1 + NakliRate) ^ NakliTime - 1)
RDMature = Round(Amount / (NakliRate), 2) & " Quartely "
Case 12
NakliRate = 0.01 * Rate / Y1H2Q4M12: NakliTime = TimePeriod * Y1H2Q4M12
Amount = P * 1 * (1 + NakliRate) * ((1 + NakliRate) ^ NakliTime - 1)
RDMature = Round(Amount / (NakliRate), 2) & " Monthly "
End Select
End Function

"Reusable Code Snippet" posts should include more detail about how to use and read as a tutorial too if possible.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.