Results 1 to 3 of 3
  1. #1
    DB2010MN26 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    37

    Best data type & length for currency calculations that involve percentages

    I have a database that I'm building off of a process that is currently done in excel. I want my percentages calculations to match what I get in excel but I'm finding the numbers to be off by as much as .4%. I'm pretty sure they issue has to do with the precision of its calculations but I need some advise on what the best settings are.

    My percent numbers are currently set to the field size "Double" with a percent formatting. My currency numbers are set to the format Currency and decimal places on auto.

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    The first thing you need to remember is that the format settings affect only how you see the results, not how the numbers are stored internally. Both Currency and Double have relatively high precision. If you are getting a difference of .4% between Excel and Access, that seems high. What I could suggest is first to remove all the % formats from your data, and just compare the real underlying numeric data.

    Question - are you importing from Excel to Access and then comparing, or redoing the calculations in Access?

    John

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    You need to check the formatting of the appropriate fields in both Access and Excel and make sure they match.

    Excel:
    Pct = Double, Fixed, 1 decimal place for 99.9%
    Numerator = Long
    Denominator = Long

    Access:
    Table formats
    Numerator = Long
    Denominator = Long

    form/report format
    PCT = Double, Fixed, 1 decimal place

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Data Type Mismatch in SQL
    By Phred in forum Queries
    Replies: 2
    Last Post: 01-04-2012, 03:40 PM
  2. How To Compute Percentages
    By zephaneas in forum Queries
    Replies: 7
    Last Post: 06-20-2011, 12:40 PM
  3. Replies: 2
    Last Post: 03-23-2011, 11:43 AM
  4. Replies: 2
    Last Post: 03-18-2010, 08:24 PM
  5. Number data type
    By BernardKane in forum Access
    Replies: 1
    Last Post: 11-11-2006, 08:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums