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

SUMIF in Adobe pro XI, equivalent to Excel=SUM.IF(C7:C68;C78;D7:D68

New Here ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

I have tried every SUMIF formula on these forums. But none of them worked for me. So I really need your help to complete my formula.

W

          20,00

G

          80,00

W

          23,00

G

          40,00

W

            0,05

G

            2,00

W

            5,00

G

          10,00

W

          70,00

G

          45,00

What I am trying to do is get the total of all the amounts behind "W" and behind "G". So in this case it would be W= € 118,05 and G= € 177(These outcomres will come in "Text1.1" And in Text1.2".

The row (from top to bottom) with G and W are called "Text9" and the second row is called "Text10". In  the rows there are 61 lines (Text9.1/Text9.2/Text9.3 etc).

Can somebody please help me with this formula

TOPICS
Acrobat SDK and JavaScript , Windows

Views

409

Translate

Translate

Report

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 ,
Feb 05, 2018 Feb 05, 2018

Copy link to clipboard

Copied

Let's say you have 10 such rows. Use this code as the custom calculation script for the field that should hold the total value for "G":

var totalG = 0;

for (var i=1; i<=10; i++) {

    var v = this.getField("Text9."+i).valueAsString;

    if (v=="G") totalG+=Number(this.getField("Text10."+i).valueAsString);

}

event.value = totalG;

You can adjust this code (by changing the condition in line #4 to v=="W") for the second total field.

Votes

Translate

Translate

Report

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
New Here ,
Feb 05, 2018 Feb 05, 2018

Copy link to clipboard

Copied

LATEST

Thank you it worked. Now it seems so simple. I only needed to change the amount off fields. Thank you for your effort.

Votes

Translate

Translate

Report

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