Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Excel SUMIF to Acrobat Pro PDF

New Here ,
May 05, 2023 May 05, 2023

I have a form that needs to calculate the total amount of a financial adjustment, to include a positive total, a negative total, and a combined total. There are two fields that display this information. 

A drop down box with a "+" and "-" (valued at "1" and "-1") respectively (aptly titled "Row1" through "Row10")

A text field for the amount to be entered (formatted to currency) (titled "DollarVar1" through "DollarVar10")

 

Normally in Excel, I would use something like this: 

 =SUMIF(B2:B10,">0",C2:C10) 
 =(SUMIF(B2:B10,"<0",C2:C10))*-1 
 =SUM(E2:E4) 

 

I have 0 experience with JS and I have researched and tried to the point where my brain feels like pudding in my head. I have not been having any luck, online tutorials are looking more and more like Greek to me.

 

I have looked into doing a looping Array, and using If...Else but I feel I have just confused myself at this point as I have not been able to get any results other than verifying my +/- column is translating to 1 and -1. Please help me make sense.

 

TOPICS
Create PDFs , How to , JavaScript
569
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2023 May 06, 2023
LATEST

While you can do it using a script, of course, you actually don't have to. Instead, you can use the Simplified Field Notation option with this formula:

 

(Row1*DollarVar1)+(Row2*DollarVar2)+...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines