ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   price and yield functions (https://www.excelbanter.com/excel-programming/334515-price-yield-functions.html)

mike allen[_2_]

price and yield functions
 
How do you use the price and yield functions in code? I tried:

Sub testyield()
Cells(1, 1) = Application.yield(Cells(2, 1), Cells(3, 1), Cells(4, 1),
Cells(5, 1), 100, 2, 0)
End Sub
obviously, the inputs are settlement, maturity, rate, price, etc. that work
on spreadsheet.

Do I have to activate these functions somehow? I do have to enable analysis
tool pak in order to use functions such as these on a spreadsheet, but what
about code?

Thanks, Mike Allen




All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com