Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Excel 2003 vs 2007: "Yield" function from VBA?

131 views
Skip to first unread message

(PeteCresswell)

unread,
May 16, 2012, 2:57:06 PM5/16/12
to
Seems like "Yield" is more than just broken like AccrIntm was.

In 2003, this works:

?gExcelApp.Evaluate("YIELD(" & mySettlementDate & "," &
myMaturityDate & "," & myCouponRate & "," & thePrice & "," &
redemptionValue_Asssumed & "," & myPaymentFrequency_Excel & "," &
myBasis)

In 2007, I was hoping that this would work (as it does
analogously for AccrIntM):

?gExcelApp.Evaluate("YIELD(" & mySettlementDate & "," &
myMaturityDate & "," & myCouponRate & "," & thePrice & "," &
redemptionValue_Asssumed & "," & myPaymentFrequency_Excel & "," &
myBasis)

But no joy.

Tried this:
?gExcelApp.Evaluate("YIELD(" & mySettlementDate & "," &
myMaturityDate & "," & myCouponRate & "," & thePrice & "," &
redemptionValue_Asssumed & "," & myPaymentFrequency_Excel & "," &
myBasis)

but no-go either. Changed "Evaluate" to "Eval", no better.

Anybody been here?

--
Pete Cresswell

Patrick Finucane

unread,
May 16, 2012, 3:20:22 PM5/16/12
to
Here's a link I found. http://office.microsoft.com/en-us/excel-help/yield-function-HP010343047.aspx.
It states "Important Dates should be entered by using the DATE
function, or as results of other formulas or functions. For example,
use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur
if dates are entered as text." Could that be an issue?



0 new messages