I think that explains it. Thanks. On Jul 21, 11:08 am, Stuart Redmann <dertop...@web.de> wrote: > On 20 Jul., larry wrote: > > > > > I have a macro where I copy data into an array from one sheet and then > > > > post it in another sheet and there is something odd. .8 becomes , > > > > 799999, .15 becomes .15000001. The other way around this would be > > > > rounding. It only changes the values in the first column. Any ideas on > > > > what is going on? > > On 21 Jul., larry wrote: > > > Since the data was hard entered, typed directly, there shouldn't be > > any extra digits hanging around. > > It does not matter whether you have entered the number exactly because > Excel has to transform your text into a floating point number. Since > there is no floating point number that has the value 0.15, Excel will > use a floating point number that is closest to 0.15 (in your example > 0.1500001). However, Excel performs some magic with floating point > values so that it will display "0.15" even if the floating point value > is 0.1500001 (seehttp://www.cs.berkeley.edu/~wkahan/ARITH_17.pdffor > some examples of what Excel does). Apparently Excel does not cope with > the case that the number is entered via some macro, hence you see the > slighly "off" values. This may be a bug, although some people rather > consider Excel's displaying "0.15" a bug. > > Regards, > Stuart
-- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe