Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rounding Access to Excel (2003 SP2)

    I have a percentage field in an Access table which is set to 2 decimal places. I have the table linked to Excel, and when I update the table in Excel, instead of, for example, a value of 6.00%, I get a value of 5.99999986588954%.
    Of course I can format this to display two decimal places, however how can I just import the percentages to two decimal places?
    Thanks for your help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Rounding Access to Excel (2003 SP2)

    Set the field size of the field in Access to Double instead of Single.
    If that doesn't help, create a query in Access with a calculated column

    RoundedValue: Round([FieldName],4)

    where FieldName is the name of your percentage field. Link to the query in Excel instead of to the table.

    Note: rounding to 4 decimal places produces percentage values with 2 decimal places.

Posting Permissions

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