# NumText ( theNumber ; CurrSymbol ; Separator ; Decimal )

Converts number to formatted text equivalent

Average rating: 3.7 (32 votes) Log in to vote

Matt Wills - Show more from this author
Virtual Vermont http://www.virtualvermont.com/FMP/ |

Numtext (123456789 ; "" ; "," ; "")

123,456,789

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

Converts a number to its formatted text equivalent.

Expands on Jeremiah Small's AddDollarFormat cf, with these differences:

-Accommodates up to Billions;

-Retains the decimal portion of the original number;

-Allows user to decide whether to include currency notation.

CurrSymbol: the desired currency symbol.

Separator: the desired thousands separator. Defaults to comma if left blank.

Decimal: the desired symbol for decimal separator. Decimal portion of number is DROPPED if left blank.

## Comments

Ken Barker, Wexford/Ireland Feb 19, 2013 |
||

I had to modify this as I required to always have 2 places of decimals. See below R = Substitute ( If ( not IsEmpty ( Decimal ) ; Case ( theNumber - Int ( theNumber ) > 0 and Length ( theNumber - Int ( theNumber ) ) ≥ 3; theNumber - Int ( theNumber ); theNumber - Int ( theNumber ) > 0 and Length ( theNumber - Int ( theNumber ) ) = 2; theNumber - Int ( theNumber ) & "0"; ".00"); ""); "."; Decimal ) It still saved me some time so thanks a lot... |
||

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