From a7dd65f811df7ef82c575a1c3c0be074cb880924 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Fri, 16 Jun 2017 17:38:23 -0300 Subject: tdf#84675 Add help page for MIRR function of VBA Change-Id: I7b55b4994a1c65b714be3ad4114aee9233502276 Reviewed-on: https://gerrit.libreoffice.org/38901 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- AllLangHelp_sbasic.mk | 1 + source/auxiliary/sbasic.tree | 1 + source/text/sbasic/shared/03140004.xhp | 78 ++++++++++++++++++++++++++ source/text/sbasic/shared/special_vba_func.xhp | 4 +- 4 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 source/text/sbasic/shared/03140004.xhp diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk index 731bb7d46b..6ef7255545 100644 --- a/AllLangHelp_sbasic.mk +++ b/AllLangHelp_sbasic.mk @@ -328,6 +328,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\ helpcontent2/source/text/sbasic/shared/03140001 \ helpcontent2/source/text/sbasic/shared/03140002 \ helpcontent2/source/text/sbasic/shared/03140003 \ + helpcontent2/source/text/sbasic/shared/03140004 \ helpcontent2/source/text/sbasic/shared/05060700 \ helpcontent2/source/text/sbasic/shared/code-stubs \ helpcontent2/source/text/sbasic/shared/keys \ diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree index d95a88c484..b690cf8684 100644 --- a/source/auxiliary/sbasic.tree +++ b/source/auxiliary/sbasic.tree @@ -184,6 +184,7 @@ Log Function [Runtime] Mid Function, Mid Statement [Runtime] Minute Function [Runtime] +MIRR Function [Runtime - VBA] MkDir Statement [Runtime] Mod-Operator [Runtime] Month Function [Runtime] diff --git a/source/text/sbasic/shared/03140004.xhp b/source/text/sbasic/shared/03140004.xhp new file mode 100644 index 0000000000..710b834ca7 --- /dev/null +++ b/source/text/sbasic/shared/03140004.xhp @@ -0,0 +1,78 @@ + + + + + + + MIRR Function [Runtime - VBA] + /text/sbasic/shared/03140004.xhp + + + + + + +
+ + MIRR function + + + +MIRR Function [Runtime - VBA] +Calculates the modified internal rate of return of a series of investments. +
+ + + + +MIRR(Values() as Double, Investment as Double, ReinvestRate as Double) + + + +Double + + +Values(): An array of cash flows, representing a series of payments and income, where negative values are treated as payments and positive values are treated as income. This array must contain at least one negative and at least one positive value. +Investment: is the rate of interest of the investments (the negative values of the array). +ReinvestRate: the rate of interest of the reinvestment (the positive values of the array). + + + + + +REM ***** BASIC ***** +Option VBASupport 1 +Sub ExampleMIRR + Dim cashFlow(0 to 3) As Double + cashFlow(0) = -5 + cashFlow(1) = 10 + cashFlow(2) = 15 + cashFlow(3) = 8 + mirrValue = MIRR(cashFlow,0.5,0.1) * 100 + Print mirrValue ' returns 94.16. The modified internal rate of return of the cash flow. +End Sub + + +
+MIRR function in CALC +VBA financial functions +
+ + +
\ No newline at end of file diff --git a/source/text/sbasic/shared/special_vba_func.xhp b/source/text/sbasic/shared/special_vba_func.xhp index 12d68f22e0..e4101b8f50 100644 --- a/source/text/sbasic/shared/special_vba_func.xhp +++ b/source/text/sbasic/shared/special_vba_func.xhp @@ -79,7 +79,7 @@ IRR - MIRR + MIRR NPer @@ -157,4 +157,4 @@ - \ No newline at end of file + -- cgit