Turn unformatted number into dollars with commas rounded to nearest penny.
Sample Input:
AddDollarFormat ( 123456789 )
Sample Output:
$ 123,456,789.00
Description:
Note: On 10/5/2006, Micah Woods modified the function to support negative numbers. Thanks Micah.
Note: A typo was fixed in this function on 9/14/2005 which caused the original version to return the wrong value for 7 and 8 figure numbers. Thanks to Angie at Biscuit Technology for reporting the problem :)
This function takes an unformatted number and formats it with dollar sign, commas, and rounds to the nearest penny. It is useful if you need to display dollar results in a concatenated text field with other text. It only will format numbers up to 999,999,999.99. Numbers larger than that will be returned without commas. Of course if you need to format 1 billion dollars and higher, you can afford to have me extend the range if you can't figure out how to do it yourself :)
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
Bar codes for your FileMaker solution: No special fonts, no plug-ins. Click
here.
Custom Function Authors:
Link to all of your own custom functions on this site with the following URL:
http://www.briandunning.com/filemaker-custom-functions/results.php?author=Your
Name Here