From 9411338fe715ff1c7190ec0761b5b54d40f1f5fb Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 24 Jul 2017 00:54:24 -0300 Subject: tdf#108678 Help page for VBA function Rate Change-Id: Ied97ddb4654817c705108b77a62dedcf3b001e34 Reviewed-on: https://gerrit.libreoffice.org/40352 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- AllLangHelp_sbasic.mk | 1 + source/auxiliary/sbasic.tree | 1 + source/text/sbasic/shared/03140010.xhp | 77 ++++++++++++++++++++++++++ source/text/sbasic/shared/special_vba_func.xhp | 4 +- 4 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 source/text/sbasic/shared/03140010.xhp diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk index d2c2ee8cb0..d576d7aa48 100644 --- a/AllLangHelp_sbasic.mk +++ b/AllLangHelp_sbasic.mk @@ -334,6 +334,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\ helpcontent2/source/text/sbasic/shared/03140007 \ helpcontent2/source/text/sbasic/shared/03140008 \ helpcontent2/source/text/sbasic/shared/03140009 \ + helpcontent2/source/text/sbasic/shared/03140010 \ 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 04ec3e5a61..26531c192e 100644 --- a/source/auxiliary/sbasic.tree +++ b/source/auxiliary/sbasic.tree @@ -212,6 +212,7 @@ Public Statement [Runtime] Put Statement [Runtime] QBColor Function [Runtime] +Rate Function [Runtime - VBA] RGB Function [Runtime] RSet Statement [Runtime] RTrim Function [Runtime] diff --git a/source/text/sbasic/shared/03140010.xhp b/source/text/sbasic/shared/03140010.xhp new file mode 100644 index 0000000000..30767b7267 --- /dev/null +++ b/source/text/sbasic/shared/03140010.xhp @@ -0,0 +1,77 @@ + + + + + + + Rate Function [Runtime - VBA] + /text/sbasic/shared/03140010.xhp + + + + + + +
+ + Rate function + + + +Rate Function [Runtime - VBA] +Returns the Present Value of an investment resulting from a series of regular payments. +
+ + + +Pmt( NPer as Double, Pmt as Double, PV as Double [FV as Variant], [Due as Variant], [Guess as Variant] ) + + +Double + +NPer is the total number of periods, during which annuity is paid. +Pmt is the regular payment made per period. +PV is the present value of the loan / investment. +FV (optional) is the future value of the loan / investment. +Due (optional) defines whether the payment is due at the beginning or the end of a period. +0 - the payment is due at the end of the period; +1 - the payment is due at the beginning of the period. +Guess(optional) determines the estimated value of the interest with iterative calculation. + + + + +REM ***** BASIC ***** +Option VBASupport 1 +Sub ExampleRate +' Calculate the interest rate required to pay off a loan of $100,000 over +' 6 years, with payments of $1,500, due at the end of each month. + Dim mRate As Double + mRate = Rate( 72, -1500, 100000 ) + print mRate' mRate is calculated to be 0.00213778025343334 +End sub + + +
+RATE function in CALC + +
+ + +
\ 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 39f33a57f9..dd4998ba0d 100644 --- a/source/text/sbasic/shared/special_vba_func.xhp +++ b/source/text/sbasic/shared/special_vba_func.xhp @@ -64,11 +64,9 @@ + - - Rate - SLN -- cgit