I have the following spreadsheet
A B C D
1 Issuer Coupon Notional Interest
2 Ford 6.00 1,000,000
3 GM 6.50 2,000,000
4 MSFT 7.00 3,000,000
I would like to enter a formula in column D that will multiply column B * Column C * .01
I am able to create variable for the ranges of the Coupon and the Notional and believe there is some way I can enter formulas for the whole range of Interest (D2:D4) that would multiply B*C*.01.
Below is my code so far.
Thank you for your help.
A B C D
1 Issuer Coupon Notional Interest
2 Ford 6.00 1,000,000
3 GM 6.50 2,000,000
4 MSFT 7.00 3,000,000
I would like to enter a formula in column D that will multiply column B * Column C * .01
I am able to create variable for the ranges of the Coupon and the Notional and believe there is some way I can enter formulas for the whole range of Interest (D2:D4) that would multiply B*C*.01.
Below is my code so far.
Thank you for your help.
VBA Code:
Sub AnnualInterest()
Set LastRow = Cells.Find(What:="Issuer").End(xlDown)
Set FirstCoupon = Cells.Find(What:="Coupon").Offset(1)
Set Coupon = Range(FirstCoupon, Cells(LastRow.Row, FirstCoupon.Column))
Set FirstNotional = Cells.Find(What:="Notional").Offset(1)
Set Notional = Range(FirstNotional, Cells(LastRow.Row, FirstNotional.Column))
Set FirstInterest = Cells.Find(What:="Interest").Offset(1)
Set Interest = Range(FirstInterest, Cells(LastRow.Row, FirstInterest.Column))
End Sub
Last edited by a moderator: