Consulting

Results 1 to 7 of 7

Thread: Change number formatting of a table

  1. #1
    VBAX Newbie
    Joined
    May 2004
    Posts
    1
    Location

    Change number formatting of a table

    I am trying to mail merge from an Excel spreadsheet in Excel 2002. Some of the fields in excel have values that I have changed to precision as displayed. A value of 834.90 came across as a value of 834.899999999. Even when I went back into the spreadsheet and manually changed the value to 834.9, it still comes across as 834.89999999. How do I change the formating in the table so that it reflects commas and two decimal places. I am able to do formulas on other numbers in the table that add numbers together and those will format properly. What I need to do is to format stand alone numbers.
    Last edited by Jacob Hilderbrand; 06-09-2004 at 07:25 AM. Reason: Better description of problem needed

  2. #2
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    I explained to Holly bvbax (before she came to vbax, LOL) that she can use the ROUND formula in Excel.

    However, I don't know if that is desired in the worksheet itself. Holly?

    If it is NOT, then we need a solution where Holly can copy/paste to Word with the 2-decimal format. Anyone?

    I really think this is more of an Excel solution, though. If anyone else agrees, we'll move it to that forum.

    Welcome, Holly!
    ~Anne Troy

  3. #3
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    yeah, i think it's probably an excel solution also. i'm under the impression (w/ Precision as Displayed) that it won't change your actual Values, but the way your formulas use those Values in the functions themselves.

    personally i'd use the ROUND function (but i'm a formula guy, and your at a vba website!), so you could find a vba solution! i guess it depends which way you want to go imho.

  4. #4
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Dork. I told her she could ask non-vba Qs here too, LOL!!

    ~Anne Troy

  5. #5
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Agreed, an Excel solution.

    Just a thought - Precision as Displayed only affects Numbers (but DOES permanently change them). if the Cells are formatted as General it won't have any effect (and it might need the workbook saving before it fully takes effect even then)

  6. #6
    VBAX Newbie
    Joined
    Jun 2004
    Posts
    1
    Location
    This problem is acknowledged by Microsoft and they provide a fix for this.

    Click here.

  7. #7
    VBAX Regular JOrzech's Avatar
    Joined
    Jun 2004
    Location
    Upstate New York
    Posts
    83
    Location
    I knew it had to do with the DDE and OLE options - great find Deb!
    Joanne

Posting Permissions

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