All Collections
Advanced Document Automation
Formula Fields
Convert Dollar Amount to Words Which Includes Cents: e.g. 14,003.53
Convert Dollar Amount to Words Which Includes Cents: e.g. 14,003.53

Automatically Spell Dollar Amount in Advanced Document Automation Templates

E
Written by Eszter Takacs
Updated over a week ago
Advanced.png

In this example, we want to type 14,003.53 into a number field, which automatically inserts the following language into the document:
Fourteen Thousand, Three Dollars and 53/100 ( $14,003.53)

1: Create a "Selling Price" field

Here we'll just create a regular number field.

2: Create the "Spell - Selling Price" field

When creating the "Spell- Selling Price" field, instead of selecting "Number" as the field type, select "Formula." Then in the formula input box type:

PROPER(NUMBERSTOWORDS({Selling Price}))



3: Create a "Cents Amount" field

Use the TRUNC function which removes the fractional part of the number to parse the cents amount, e.g.: 0.53

{Selling Price} - TRUNC({Selling Price})


4: Create a "Cents to Whole Number" field

Multiply this number by 100, so we get the desired format, e.g. 53 ( to support 53/100)
{Cents Amount}*100

5: Lastly, set up the final conditional field, so in every case, we have the correct cents number inserted, e.g. if there are no cents amount.

6: Insert the fields in the document


Most common Formula used in templates:

Did this answer your question?