I have a number of formulas which are in Excel form and I know I have asked for help on these kind of things before but I have three more formulas that I cannot work out how to express in javascript.
the variables are
var J17 = 6.50;
var C19 = 5;
var C20 = 6;
var C22 = 0.5;
var E26 = 0.5;
var F26 = 0.5;
Formula 1:
=1/(1+J$17*C$22*0.01)^((E26/C$22)) - Should return 0.968523002
Formula 2:
=IF(F26=C$19,100,0) - Should return 0.00
Formula 3:
=IF(E26>C$19,0,C$20*C$22) - Should return 3.00
Thats is my main problem is with Formula 1, I know that the ^ is expressed using Math.pow but I cannot work out where it should go in the javascript expression. I have had a try at this:
var calcValue = (1 / Math.pow(1 + J17 * C22 * 0.01), (E26/C22) );
But it returns infinity
* 0.01?IFstatements can be replaced with the formatsomeCondition? valueiftrue : valueiffalse. So for the first one:F26 === C19? 100 : 0=IF(E26>C$19,0,E26)E26>C19would be your condition,0would be yourvalueiftrueandE26would be your value if false. So just plug them in.