Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2014
    Posts
    15
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Question Js: excel formula "nper"..needed help!!

    Hi Members,

    Could anybody please help me how to calculate excel nper formula, it's bit difficult to calculate..

    function Fnper(){

    var rateValue = document.getElementById("interestRate").value;
    rateValue = rateValue / 100 / 12;
    var pmtValue = document.getElementById("pmt").value;
    var pvValue = document.getElementById("pv").value;

    var nperValue = Math.log(rateValue, -pmtValue, pvValue);

    document.forms[0].nperiod.value=Number(nperValue);
    }


    <input class="formula" type="text" name="serialNo" id="serialnovalue"size="10" maxlength="10" onchange="Fnper()"></td>
    <input class="formula" type="text" name="nperValue" size="10" maxlength="10" ></td>


    So here the part, is am correct with the calculation part, if so my function firing with wrong value.

    Please help me with this coding and calculation part.

    Thanks in advance.

    Regards
    Ravi

  • #2
    New Coder
    Join Date
    May 2014
    Posts
    15
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Techies please help me out...thanq

  • #3
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,473
    Thanks
    13
    Thanked 361 Times in 357 Posts
    first thing to notice: Math.log() only uses a single parameter.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •