Copy link to clipboard
Copied
Hello
I have the following issue. I need a way to calculate in a PDF.
excel formula:
=IF(OR(AND(C5=0;E5=0);AND(C5=0;G5=0);AND(E5=0;G5=0));0;ROUNDDOWN(AVERAGE(IF(C5>20000;20000+(C5-20000)/2;C5);IF(E5>20000;20000+(E5-20000)/2;E5);IF(G5>20000;20000+(G5-20000)/2;G5));0))
I have 3 values and need the average of them. But when 2 out of 3 values are 0, the result should also be 0. when a value is bigger than 20'000 then it should calculate with 20'000 + 50% of the remaining value (30'000 = 20'000 + 10'000/2).
for now im doing this calculation in excel. but i need it to be done in a pdf. would be great if anyone could show me a tool or something, after i've spent my whole day on google 🙂
thanks a lot!
jungerherr
Copy link to clipboard
Copied
Here are some resources for performing calculations in PDF forms.
https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm (Scroll down the list of example files)
https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations
https://acrobatusers.com/tutorials/conditional-execution
https://www.pdfscripting.com/public/Calculating-field-values-and-more.cfm
Copy link to clipboard
Copied
You basically have to learn Acrobat JavaScript just as you learned Excel calculation language, and make it again to do the same job. No conversion is offered. It will be much longer, but easier to read. Many functions, like AVERAGE, are not built in but must be calculated.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now