6 Replies Latest reply on Feb 17, 2016 7:31 AM by SJoval

# Dollar amount to words calc

I am converting an amount in a check to words using http://bit.ly/1U5zhyK When I have an amount of \$**.99987 The formula lists at "** dollars ninety-nine cents" and not the next whole dollar. I have used other calculations that get me to .10 or a lower dollar number(134.9982 shows as one hundred thirty-four dollars and 100/100) This (at .99982) is the only place in the cents possibilities where this occurs. Please help.

• ###### 1. Re: Dollar amount to words calc

I tested with 134.9982 and 134.99982 and the calculation returns the same for both which is

"One Hundred Thirty Four Dollars and Ninety Nine cents".

I copied the calculation from the link you provided, then I pasted the calculation in MSWord, then I replaced Numberfield with Amount.  (Amount is the field in my database) then I copy from word and pasted into AmountToWord calculation field in FM.

• ###### 3. Re: Dollar amount to words calc

Using this custom function

FileMaker Custom Function:MoneyToWords ( NumberField )

And changing the field the calculation is on to this:

numToText (Round( NumberField;2) ) //result: Text,

I get:

NumberField: 134.99982

NumToText: One Hundred Thirty Five Dollars

• ###### 4. Re: Dollar amount to words calc

The problem is that my amount field has rounded (correctly) to \$135.00. Since this is on a check, the discrepency has been noted and I've been asked to correct it.

• ###### 5. Re: Dollar amount to words calc

This is an issue with your amount field not the convert amount to text.   Add auto-enter calculation on your amount field.   Check the Calculated value then set round(Self;2) as the calculation, then uncheck do not replace existing value of field. This will change round the number to \$135.00

Here is sample database  Dropbox - DollarToWords.fmp12

• ###### 6. Re: Dollar amount to words calc

I had done that before your suggestion. It works in your example, but not in mine. It looks like my process and script to get an amount in the first place needs tweaking. Thanks to everyone for your quick and thoughtful responses.