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

New Here ,
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, Macintosh, Windows

Views

137

Likes

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

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

New Here ,
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, Macintosh, Windows

Views

138

Likes

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
Jan 25, 2018 0
Most Valuable Participant ,
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.

Likes

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
Reply
Loading...
Feb 05, 2018 1
p_agard LATEST
New Here ,
Feb 05, 2018

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Feb 05, 2018 0