• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

EASY EASY POINTS! How do I format a string so that it has appropriately placed commas?

I have an array.  It contains numbers ranging from 1 to 100,000,000.  However, the number does NOT have commas.  I want to format the numbers into a String where the numbers have appropriately placed commas.  How do I do this?

Ex:
100000000 should be formatted to 100,000,000
10000 should be 10,000
100 should be 100
1000 should be 1,000
1000000 should be 1,000,000
0
CoderBboy
Asked:
CoderBboy
1 Solution
 
Arthur_WoodCommented:
How are you displaying the numbers now?  

Use the Format function

Format(MyNumber, "#,###")
  The # will display any digit, and for values less that 1000, it will only display the value (no comma as a separator), for Numbers >= 1000, no matter how large, the value will be properly formatted (the proper 'thousands' separator)


AW
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now