+ Reply to Thread
Results 1 to 6 of 6

Range Copy loses precision with accounting type

  1. #1
    Registered User
    Join Date
    11-21-2007
    Posts
    2

    Range Copy loses precision with accounting type

    I am using a range copy and paste for cells that have accounting type with 4 decimal precision and I am losing precision in the target cells! Is this just a bug or is there a way to preserve the 4 decimal precision?

    For example, sheet1 has following 4 cells:

    $0.2343 $0.2343
    $0.2343 $0.2343

    My macro has one line of code:
    Please Login or Register  to view this content.
    Sheet 2 now has:

    $0.23 $0.23
    $0.23 $0.23

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    I expect it is simply down to the format of the cells - try:

    Please Login or Register  to view this content.
    Richard

  3. #3
    Registered User
    Join Date
    11-21-2007
    Posts
    2
    Quote Originally Posted by RichardSchollar
    Hi

    I expect it is simply down to the format of the cells - try:

    Please Login or Register  to view this content.
    Richard
    That didn't work either. It is still truncating the 3rd and 4th decimal places. It apparently applies the format but it is too late by then. The resultant cells are :

    $0.2300 $0.2300
    $0.2300 $0.2300

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Try reversing the order, and see if that helps:

    EDIT: That didn't work.
    Last edited by BigBas; 11-21-2007 at 02:12 PM.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Interesting.

    Change the source formatting from Accounting to General and it works fine.

    Or do this:
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    That's a genuinely freaky occurrence that seems (in my very limited testing) to be restricted to Currency formats. I got around it with:

    Please Login or Register  to view this content.
    Richard

    EDIT: obviously not just CCY formats if Shg's getting it with Accouting...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1