Brian Dunning's FileMaker Custom Functions

NumbertoWords

Converts a number to the correct words, works with 2 decimals only

  Be the first to rate this function Log in to vote

Eric van Oosterom   Eric van Oosterom - Show more from this author
HarperMac Marine Survey

Share on Facebook Share on Twitter

  Sample input:
NumbertoWords(31717,07;"M.T.";"Kg")
  Sample output:
Thirty One Thousand, Seven Hundred Seventeen M.T.s and Seven Kgs

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

HISTORY:
* CREATED by Don Wieland as MoneytoWords
*
* Updated Aug 10th 2006 by Tim Anderson as as MoneytoWords2
* - "Modification of Don Wieland's CF to include an 'and' after hundreds where appropriate.
* - error in formula for numbers over a million, plus now gives :
* Seven Million, Six Hundred and Fifty Four Thousand and Twenty One pounds
* rather than: Seven Million, Six Hundred and Fifty Four Thousand, Twenty One pounds
*
* Updated by Eric van Oosterom
* - added expressions "Currency" and "DecimalCurr" so that people don't have to change anything in the CF itself.
* - Enclosed the whole formula in a let statement.
* - made the code better readable.
* - renamed the CF to NumbertoWords, slightly clearer name because it can be used for other number than only for money.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 18 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: