Question: Could you help me solve this question in a excel file please? Thank you ! FINA 415 -15B Homework -5 1. A bank offers different

Could you help me solve this question in a excel file please? Thank you !

Could you help me solve this question in a excel file please?

FINA 415 -15B Homework -5 1. A bank offers different interest rates on deposit accounts. The rate is based on the size of the periodical deposit (CF) and the following table. Write a future value functionBANKFV(CF,r,n) For Periodical Deposits 5000 The interest rate is r r+0.5% r+1.1% r+1.7% r+2.1% 2. Write a payment schedule calculator macro. The macro is to ask the user for the sum of the loan, the number of payments, and the interest rate. Assume payment at the end of the period. Hints: You may want to use the worksheet function PMT The following macro and its output might be interest Sub StringConcat() Dim S As String S = "Col1" &Chr(9) & "Col2" ' Chr (9) is the Tab S = S &Chr(13) & "aaa" &Chr(9) & "bbb" MsgBox S End Sub FINA 415-15B Homework 5- Nirosha Wellalage 3. Develop code for a function that behaves in the same manner as Excel's SUM function. The function should sum all numerical values in an array. Answer: Option Base 1 Function SumArray(avec) 'VBA version of Excel's SUM function Dim n as integer. Dim I as Integer Dim total total = 0 n=Application.Count(avec) For i = 1 to n total = total + avec(i) Next i SumArray = total End function 4. Develop code for a function that behaves in the same manner as Excel's NPV function that requires two inputs, the first an array of cash flows and the second the discount rate. E.g Function NetPV(cvec,rate) Answer: Option Base 1 Function NetPV(cflowvec, rate) Dim i as integer NetPV=0 For i = 1 to Application.Count(cflowvec) NetPV=NetPV + cflowvec(i)/(1+rate)*(i-1) Next i NetPV = NetPV End function 5. The spreadsheet shows cash flow over five years for an investment proposal. After an outflow at the start, the cumulated cash flows turn positive during the third year , the time at which this happens being known as the project's payback period (here 2.4 years). The intermediate calculations determining the payback period are set out in the worksheet. They centre on cumulating cash flows at yearly intervals and testing to determine the time at which the cumulative sum first turns positive. Develop a Payback Function, say PayBack (cvec) that returns the payback period for any array of cash flows. FINA 415-15B Homework 5- Nirosha Wellalage Answer: VBA code for payback function Option Base 1 Function payback (cvec) 'calculated payback period i.e. no of years (to 1dpl) ' initial cash flow must be negative Dim csum 'csum = cumulative cash flow Dim I As Integer If cvec(1) > 0 Or Application.sum(cvec) 0 Then Exit for End if Next i csum = csum - cvec(I) Payback = Application.Round(i-2csum/cvec(i),1) End if End function FINA 415-15B Homework 5- Nirosha Wellalage

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!