Jump to content
Sign in to follow this  

Number presentation with comma (digit grouping) delimiters

Recommended Posts


Is there a UDF to convert numerics into a readable format so that commas can be shown?

Example: Input is 123456.789 when formatted becomes 123,456.789

If not, can we add a new flag 'c' to the inbuilt StringFormat function to facilitate adding these?

(Issue: Internationalisation/Locale: Some countries use the decimal point for their digit grouping delimiter, so this may have to be extracted from the locale settings in Windows to decide)

If not, is there a need for an UDF to do this? Is it more appropriate to put it on the Math, Misc, or String UDFs or should I roll my own?

Comment: I found the examples and explanations in the StringFormat help page needed a bit of head scratching. Maybe a fuller example with more parts would be helpful.

Share this post

Link to post
Share on other sites
Daniel W.

Func _komma( $num )
    $number = StringReplace( $num , "." , "," )
    Return $number

This should it be for komma replace :D

Edited by Daniel W.

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.