Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts

    Formatting numbers with VBA

    I am trying to use a VBA FORMAT statement to display numbers with no decimal places and the comma separator.

    "00" gives me the correct display but without the commas

    "000,0" gives me the commas whether they are needed or not ie 0,067 instead of 67.

    What should I be using to get the desired format ?

    Thanks

  2. #2
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts
    OK, answered my own question !

    I needed "###,#".

    So my next question is . . . where is there a comprehensive list of the possibilities for the FORMAT statement - getting the answer above took more hunting than is usually necessary.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    This is not a bad source for the information: http://office.microsoft.com/en-us/ex...010342372.aspx

    Steve

  4. #4
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts
    Perfect, thanks.

    I find the explanations for the number formatting quite hard to follow, but the examples mostly clear it up.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •