Current Position:Home > Converting excel formulas to javascripts

Converting excel formulas to javascripts

Update:11-30Source: network consolidation
Advertisement
Hello, I am not experience in Excel formulas and creating "if" statements in Adobe Acrobat, so I'm hoping someone can help me with this. I have two problems.
1.  Here is an excel formula that I need to convert over to javascripts. Can someone help with this?
=IF(Q13>0,Q13+0,"")
2.  Here is the second one,
=IF(N16*Q16>0,((N16*Q16)+U16),"")
In addition to these two formulas I need help with, the owner of the forms does not want the numbers to round up. Is there a way to get the exact answer and not rounding the numbers up in javascript?
Thanks for your assistance.
I have Adobe Acrobat X.

The Best Answer

Advertisement
Hi George, on the first script
var Q13 = +getField("Q13").value;
  event.value = Q13 > 0 ? Q13, "";
It comes up with a SyntaxError: missing : in conditional express 2: at line 3
Do you know what that means and how to correct?
Thanks
Connie