Greenseed Posted April 24, 2005 Share Posted April 24, 2005 hi! i need to format a number from this 1254687 to this 1 254 687$, i can do this with multiple string command! but i wanna know if there a solution with the command StringFormat(). Thx in advance! bye bye GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You. Link to comment Share on other sites More sharing options...
condoman Posted April 25, 2005 Share Posted April 25, 2005 You could use/modify this to do the formatting. Func _MakeComma($Number) Local $_Number, $_Loop If $Number < 1000 Then Return $Number For $_Loop = 1 To Int(StringLen($Number) / 3) $_Number = "," & StringRight($Number, 3) & $_Number $Number = StringTrimRight($Number, 3) Next $_Number = StringRight($Number, 3) & $_Number If StringLeft($_Number, 1) = "," Then $_Number = StringTrimLeft($_Number, 1) Return $_Number EndFunc ;==>_MakeComma Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now