fm3_problems39

# X cf temp 0 if isarrayx then if uboundx 1 then isrow

This preview shows pages 14–16. Sign up to view the full content.

X = CF: Temp = 0 If IsArray(X) Then If UBound(X) = 1 Then IsRow = True Else IsRow = False If IsRow Then For i = 1 To UBound(X, 2) Temp = (Temp + X(1, i)) * (1 + GetR2(R, Temp)) Next i Else For i = 1 To UBound(X) Temp = (Temp + X(i, 1)) * (1 + GetR2(R, Temp)) Next i End If Else Temp = X * (1 + GetR2(R, X)) End If BankFV1 = Temp End Function Function GetR2(R, Temp) If Temp > 10000 Then GetR2 = R + 0.1 Else GetR2 = R End Function E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
BankFv2 1000 #MACRO? <-- =BankFV2(\$A\$3:A3,0.1) 1000 #MACRO? <-- =BankFV2(\$A\$3:A4,0.1) 1000 #MACRO? <-- =BankFV2(\$A\$3:A5,0.1) 1000 #MACRO? <-- =BankFV2(\$A\$3:A6,0.1) 1000 #MACRO? <-- =BankFV2(\$A\$3:A7,0.1) 1000 #MACRO? <-- =BankFV2(\$A\$3:A8,0.1) 1000 #MACRO? <-- =BankFV2(\$A\$3:A9,0.1) 1 -1,100.00 <-- =FV(0.1,A12,2000,0,1) 2 -2,310.00 <-- =FV(0.1,A13,2000,0,1) 3 -3,641.00 <-- =FV(0.1,A14,2000,0,1) 4 -5,105.10 <-- =FV(0.1,A15,2000,0,1) 5 -6,715.61 <-- =FV(0.1,A16,2000,0,1) 6 -8,487.17 <-- =FV(0.1,A17,2000,0,1) 7 -10,435.89 <-- =FV(0.1,A18,2000,0,1) BankFV1 and BankFV2 are the same the only change is in the GetR function A B C D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Function BankFV2(CF As Variant, R As Double) As Double Dim X As Variant, Temp As Double, i As Integer Dim IsRow As Boolean X = CF: Temp = 0 If IsArray(X) Then If UBound(X) = 1 Then IsRow = True Else IsRow = False If IsRow Then For i = 1 To UBound(X, 2) Temp = (Temp + X(1, i)) * (1 + GetR3(R, Temp)) Next i Else For i = 1 To UBound(X) Temp = (Temp + X(i, 1)) * (1 + GetR3(R, Temp)) Next i End If Else Temp = X * (1 + GetR3(R, X)) End If BankFV2 = Temp End Function Function GetR3(R, Temp) If Temp <= 1000 Then GetR3 = R + 0.002 ElseIf Temp <= 5000 Then GetR3 = R + 0.005 ElseIf Temp <= 10000 Then GetR3 = R + 0.01 Else GetR3 = R + 0.013 End If End Function E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern