Skip to main content
Participant
May 5, 2023
Question

Excel SUMIF to Acrobat Pro PDF

  • May 5, 2023
  • 1 reply
  • 624 views

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.

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
May 6, 2023

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)+...