summaryrefslogtreecommitdiff log msg author committer range
path: root/source/text/sbasic/shared/03140003.xhp
blob: cd5fc6f7551e369e90d9cdc93dae95c61fe8d767 (plain)
 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77   IRR Function [Runtime - VBA] /text/sbasic/shared/03140003.xhp
IRR function IRR Function [Runtime - VBA] Calculates the internal rate of return for an investment.
IRR(Values() as Double , [Guess as Variant]) Double Values(): The array of values of the cash-flow. The values represent cash flow values at regular intervals, at least one value must be negative (payments), and at least one value must be positive (income). Guess An initial estimate at what the IRR will be. REM ***** BASIC ***** Option VBASupport 1 Sub ExampleIRR Dim cashFlow(0 to 3) As Double cashFlow(0) = -10000 cashFlow(1) = 3500 cashFlow(2) = 7600 cashFlow(3) = 1000 irrValue = IRR(cashFlow) * 100 Print irrValue ' returns 11.3321028236252 . The internal rate of return of the cash flow. End Sub
IRR function in CALC VBA financial functions