{"id":369,"date":"2014-01-02T03:36:18","date_gmt":"2014-01-02T03:36:18","guid":{"rendered":"http:\/\/www.lorenzcom.com\/?p=369"},"modified":"2020-12-03T07:29:03","modified_gmt":"2020-12-03T13:29:03","slug":"npvv","status":"publish","type":"post","link":"https:\/\/lorenzcom.com\/?p=369","title":{"rendered":"NPVV (NPVValuelist)"},"content":{"rendered":"<h3>NPVV ( cashFlowsList , interestRate )<\/h3>\n<p>NPVV calculates Net Present Value of a value list of cash flows (cashFlowsList) with a specified rate of return (interestRate). Used to determine the present value of an investment by the discounted sum of all cash flows paid or received.<\/p>\n<p>NPVV calculates Net Present Value from a value list instead of a repeating field that FileMaker Pro requires with its NPV function. This custom function provides more flexibility and ease-of-use than the built-in function, with the same calculation results and similar speeds. A list of 360 cash flows was processed through this custom function with no noticeable speed problem.<\/p>\n<h4>Parameters<\/h4>\n<ul>\n<li>cashFlowsList &#8211; Value list of cash flows.<\/li>\n<li>interestRate &#8211; Specified rate of return.<\/li>\n<\/ul>\n<h4>Examples<\/h4>\n<ul>\n<li>NPVV ( &#8220;-500000\u00b6200000\u00b6300000\u00b6200000&#8221;, .1 ) = 80025.0262960180315552<\/li>\n<li>NPVV ( List ( -2000, 600, 300, 500, 700, 400 ), .05 ) = 164.7584131734254368<\/li>\n<li>NPVV ( List ( -5000, 10000, 0, 10000, 10000 ), .1 ) = 18434.1916535755754388<\/li>\n<\/ul>\n<p><strong>DISCLAIMER:<\/strong> Using this NPVV function, several calculations were compared against the results obtained on other NPV calculators and the results matched. However, that does not guarantee a correct result in every operation of this custom function, so you assume this risk when you use it.<\/p>\n<p><strong>NOTICE:<\/strong> This is a recursive function. If you change the function name then also change it in the function code.<\/p>\n<p><strong>NPVV code:<\/strong> Copy the selected code (click on Select All to highlight all the code) to the clipboard and paste it into a newly created Custom Function. <a href=\"\/docs\/FileMaker\/NPVV.zip\">Download code as a text file from here.<\/a><\/p>\n<form><textarea id=\"te_369\" style=\"width: 100%; height: 180px; font-family: Arial,Helvetica; font-size: .90em; line-height: normal;\">&lt;!&#8211;raw&#8211;&gt;Let (&lt;br \/&gt;<br \/>\ncfct = ValueCount ( cashFlowsList ) ;&lt;\/p&gt;<br \/>\n&lt;p&gt;GetValue ( cashFlowsList;  cfct ) \/ ( 1 + interestRate ) ^ ( cfct &#8211; 1 ) + If ( cfct &gt; 0 ; NPVV ( LeftValues ( cashFlowsList ; cfct &#8211; 1 ) ; interestRate ); 0 )&lt;\/p&gt;<br \/>\n&lt;p&gt;)&lt;\/p&gt;<br \/>\n&lt;p&gt;\/*&lt;br \/&gt;<br \/>\nNPVV ( cashFlowsList, interestRate )&lt;\/p&gt;<br \/>\n&lt;p&gt;Created: 4-5-2013&lt;br \/&gt;<br \/>\nModified: 1-2-14&lt;br \/&gt;<br \/>\nAuthor: Lewis C. Lorenz&lt;\/p&gt;<br \/>\n&lt;p&gt;Calculate Net Present Value of a value list of cash flows (cashFlowsList) with a specified rate of return (interestRate). Used to determine the present value of an investment by the discounted sum of all cash flows paid or received. Calculates Net Present Value from a value list instead of a repeating field that FileMaker Pro requires with its NPV function. Provides more flexibility and ease of use than the built-in function, with the same calculation results and similar speeds.&lt;\/p&gt;<br \/>\n&lt;p&gt;Example:&lt;br \/&gt;<br \/>\n\tNPVV ( &#8220;-500000\u00b6200000\u00b6300000\u00b6200000&#8221;, .1 ) =  80025.0262960180315552&lt;br \/&gt;<br \/>\n\tNPVV ( List ( -2000, 600, 300, 500, 700, 400 ), .05 ) = 164.7584131734254368&lt;br \/&gt;<br \/>\n\tNPVV ( List ( -5000, 10000, 0, 10000, 10000 ), .1 ) = 18434.1916535755754388&lt;\/p&gt;<br \/>\n&lt;p&gt;DISCLAIMER: Using this NPVV function, several calculations were compared against the results obtained on other NPV calculators and the results matched. However, that does not guarantee a correct result in every operation of this custom function, so you assume this risk when you use it.&lt;\/p&gt;<br \/>\n&lt;p&gt;NOTICE: This is a recursive function. If you change the function name then also change it in the function code.&lt;\/p&gt;<br \/>\n&lt;p&gt;*\/&lt;!&#8211;\/raw&#8211;&gt;<\/textarea><br \/>\n<input type=\"button\" value=\"Select All\" \/> <input type=\"reset\" value=\"Reset\" \/><\/form><\/p>\n","protected":false},"excerpt":{"rendered":"<p>NPVV ( cashFlowsList , interestRate ) NPVV calculates Net Present Value of a value list of cash flows (cashFlowsList) with a specified rate of return (interestRate). Used to determine the present value of an investment by the discounted sum of <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/lorenzcom.com\/?p=369\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,15,14],"tags":[],"_links":{"self":[{"href":"https:\/\/lorenzcom.com\/index.php?rest_route=\/wp\/v2\/posts\/369"}],"collection":[{"href":"https:\/\/lorenzcom.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lorenzcom.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lorenzcom.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lorenzcom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369"}],"version-history":[{"count":20,"href":"https:\/\/lorenzcom.com\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions"}],"predecessor-version":[{"id":877,"href":"https:\/\/lorenzcom.com\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions\/877"}],"wp:attachment":[{"href":"https:\/\/lorenzcom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lorenzcom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lorenzcom.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}