Skip to main content
Participant
April 30, 2020
Question

Excluding cells when adding sums together

  • April 30, 2020
  • 2 replies
  • 723 views

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

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
May 1, 2020

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 PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
April 30, 2020

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?

Participant
April 30, 2020

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. 

try67
Community Expert
Community Expert
April 30, 2020

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?