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

'call it like
List1.Clear

``````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``````
rproffitt 2,605

"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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.