• Global community
• Language:
• Deutsch
• English
• EspaÃ±ol
• FranÃ§ais
• PortuguÃªs
• æ—¥æœ¬èªžã‚³ãƒŸãƒ¥ãƒ‹ãƒ†ã‚£
Dedicated community for Japanese speakers
• í•œêµ­ ì»¤ë®¤ë‹ˆí‹°
Dedicated community for Korean speakers
Exit
• How to add Dollar and Cent in separate Column and ...

# How to add Dollar and Cent in separate Column and carry the whole dollar to dollar column?

New Here ,
Aug 19, 2024 Aug 19, 2024

Copied

I created a form version of our business bank deposit slip to easily enter cash and check information. I then auto calculated totals from each column (1 being dollars and 2 being cents). The problem I am facing is I can't figure out a way to carry over the total from cents to dollars when the cents column is more than 0.99. Is there a formula within adobe to carry this number over and "reset" at 0.00 when passing a full dollar in the cents column?

TOPICS
How to , PDF forms

Views

97

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
3 Replies 3
Enthusiast ,
Aug 19, 2024 Aug 19, 2024

Copied

The easiest way is to make one field per row, formated as a 2 decimal number, right justify the fields, and line them up so the decimal is on top of the black vertical line separating dollars and cents:

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 Expert ,
Aug 19, 2024 Aug 19, 2024

Copied

Remove both calculations from "TOTAL" and "TOTAL CENTS" field, then use this as 'Custom calculation script' of "TOTAL" field:

var cents = 0, dollars = 0;

for(var i = 1; i <= 28; i++) {
cents += Number(this.getField("Check Cents " + i).valueAsString) || 0;
dollars += Number(this.getField("Check \$ " + i).valueAsString) || 0;}

dollars += Math.floor(cents / 100);
var Rcents = cents % 100;

if (Rcents < 10)
Rcents = "0" + Rcents;

event.value = dollars;
this.getField("TOTAL CENTS").value = Rcents;

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Aug 20, 2024 Aug 20, 2024

Copied

LATEST

Nice work.