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

Excluding cells when adding sums together

New Here ,
Apr 30, 2020 Apr 30, 2020

Copy link to clipboard

Copied

Hello,

 

I have a fillable PDF that totals the amount of several cells at the bottom (20 total). In some cases it is a dollar amount (which I want it to sum up) and in other cases it is text or percentages that I want it to exclude. Is this possible to exclude them and how do I do it?

 

Thanks

TOPICS
Acrobat SDK and JavaScript

Views

455

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 ,
Apr 30, 2020 Apr 30, 2020

Copy link to clipboard

Copied

Just don't include them in the list of fields you're adding up... Or do you mean that in some cases you do want to include them in the calculation, and in others you don't? If that's the case, what is the condition to include (or exclude) them?

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 ,
Apr 30, 2020 Apr 30, 2020

Copy link to clipboard

Copied

It is a spreadsheet that is used with multiple people so I will not know when certain people will need to add a percentage or a dollar amount. I wanted it to assume that if the cell was a dollar amount to add it to the total and if it was a percentage to exclude it. 

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
Community Expert ,
Apr 30, 2020 Apr 30, 2020

Copy link to clipboard

Copied

You can't format a field to be both. So does the field have no Format setting at all, and people just enter to it what they want?

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 ,
Apr 30, 2020 Apr 30, 2020

Copy link to clipboard

Copied

Correct, there is no formating and dollar amount, percentage or text can be entered. It is a worksheet to enter bonuses and sometimes a bonus is a dollar amount, percentage or text needs to be entered for example, $1/more per hour. 

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
Community Expert ,
May 01, 2020 May 01, 2020

Copy link to clipboard

Copied

I don't see how this is going to work, unless you use Natural Language Processing to determine what the user entered, and even then it will be difficult to use it in a calculation.

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
Community Expert ,
May 01, 2020 May 01, 2020

Copy link to clipboard

Copied

LATEST

If the user types in a % or $, then the number values can be differenciated, but otherwise a number is a number.  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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