Skip to main content
andyhfx
Participant
Dec 21, 2016 2:07 PM UTC
Answered

javascript equation help please...

I have the following in an excel cell: =IF(N32>75,N32-75,0)

Can anyone help me with turning that into an equation I can use in Acrobat Pro X?

Thank you very much to any replies...

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Dec 21, 2016 2:55 PM UTC

Assuming the field names in the PDF file are the same as those of the cells in the Excel file, you can use this code (as a custom calculation script) to achieve it:

var v1 = Number(this.getField("N32").value);

if (v1>75) event.value = v1-75;

else event.value = 0;

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Dec 21, 2016 2:55 PM UTC

Assuming the field names in the PDF file are the same as those of the cells in the Excel file, you can use this code (as a custom calculation script) to achieve it:

var v1 = Number(this.getField("N32").value);

if (v1>75) event.value = v1-75;

else event.value = 0;

Translate