Results 1 to 6 of 6

Array Output to Range Losing Precision Unexpectedly

Threaded View

  1. #1
    Registered User
    Join Date
    02-24-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    32

    Array Output to Range Losing Precision Unexpectedly

    URL to same post in other forum http://www.ozgrid.com/forum/showthre...d=1#post562139

    The attached macro formats input to output. The final steps shown below transfer the contents of the array 'y' to the sheet 'output'.

    Next: With Sheets("output").[a2].Resize(j, 11): .Value = y: .Offset(, 6).Resize(,5).NumberFormat = "0.00": End With

    A simple message box tells me that array element y(1,10) is 10.4513
    MsgBox y(1,10)

    Excellent! Just what I wanted.

    However, when I look on the output tab in cell J2, I am disappointed to see that it produced a value of 10.45, dropping off two decimal places.I have worked with this for quite some time, but have not found a way to get it to show the correct values, 10.4513 in J2 for example. (impacts entire column j and k)

    What would you guys change in the code above to get it to work?

    Thanks in advance,

    -Michael
    Attached Files Attached Files
    Last edited by msmithdynamicsgp; 06-28-2011 at 08:51 AM.

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