Software Venture Consulting
ToMarket

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Brian Dunning
Contact me | vCard


Brian on CNN
Brian on CNN


Brian on CBS Radio


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

AddDollarFormat ( Number )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 3.9  (8 votes)
  Discuss this Custom Function

Jeremiah Small, Soliant Consulting
http://jsmall.us

Turn unformatted number into dollars with commas rounded to nearest penny.

Sample Input:
AddDollarFormat ( 123456789 )
Sample Output:
$ 123,456,789.00


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

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.

This is my Custom Function and I want to edit it

Discuss:

This is better than mine because it inserts commas. (I guess that depends on whether you want commas.)

Brian Dunning, Laguna Niguel, CA
January 19, 2009 3:41pm

Very nice. Can you add some variables for setting prices ( merchandising )

a) rounds to the nearest (5), then subtracts ($.01) or ($.05) to get $14.99 or $14.95

b) rounds to the nearest (10), then subtracts ($.01) or ($.05) to get $89.99 or $89.95

Tom Myers, Seattle WA
May 20, 2009 2:58pm

I've used this function and added:

1. Can pass a prefix
2. Can declare precision of rounding
3. Added formatting to 15 characters (trillions)

Where should I add the updated version?

Eric Ridgley, Fairlawn, OH
January 12, 2010 11:52am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 0 + 4 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. GroupRelationInfo ( FileTarget ; TableTarget ; Result )
  (Tue, Mar 16, 5:57am)
2. GeoBox(latitude;longitude; radius)
  (Mon, Mar 15, 11:04am)
3. MonthNameList ( start; number; short )
  (Sun, Mar 14, 11:45pm)
4. matchListAB( ListA ; ListB; match_Value; match_operator ; getN )
  (Sun, Mar 14, 10:29pm)
5. Bin2Hex ( binary )
  (Sat, Mar 13, 10:08pm)
6. SlideView (text)
  (Sat, Mar 13, 8:40pm)
7. HashFNV1a64 ( text ; empty )
  (Sat, Mar 13, 6:23pm)
8. HashFNV1a32 ( text ; empty )
  (Sat, Mar 13, 5:55pm)

RSS Feed of Custom Functions