Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I go to this site:
http://www.moneychimp.com/articles/f.../fmbondytm.htm Look at the Example: YTM = 7.37% The formula seems simple enough, so I tried to write my own function: Function YieldMaturity(C, Y, n, P, R) Dim sumall As Double Dim j As Integer sumall = 0 For j = 1 To n sumall = sumall + ((C / (1 + Y) ^ n)) Next j YieldMaturity = ((sumall + (P / (1 + Y) ^ n)) / R) End Function I use these inputs: Nominal Coupon Rate = 70 Interest = 7% Bond Price = 925.6 Redemption = 1000 Years = 4 Here's me calling the function: =YieldMaturity(B7,B8,B11,B9,B10) I get a result of 93.84% Can someone please tell me what's wrong with my function? I suspect it is the summing part. Thanks! -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
one row won't calculate | Excel Discussion (Misc queries) | |||
Calculate the value of Z | Excel Discussion (Misc queries) | |||
calculate time does not calculate | Excel Discussion (Misc queries) | |||
Activesheet.Calculate failing to calculate | Excel Programming | |||
Macro that hide or unhide and not calculate or calculate | Excel Programming |