My "debugging" in a prior response was intended to show how numbers are displayed. Your single values may always contain some "fuzz".
I believe that unless declared otherwise, values within calculation are converted to double, so the double data type is often preferred to single unless for some reason you are concerned about running out of internal memory. Since the currency data type uses four places of decimal, in this case you might want to use currency variables. On Apr 7, 9:45 am, mike <mikesal...@gmail.com> wrote: > I'm working with variables that hold three decimal point numbers such > as .001 and 3.185. Excel VBA seems to add extra digits to these > variables so that instead of -0.004 the value is -0.00400000018998981 > for example. > > I've tried adding lots of rounding statements everytime I work with > the variables where I round to three decimals places. The code is > becoming ugly looking adding these rounding statements. Is there > another way to control the digits after decimal? -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 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 6,800 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 To unsubscribe, reply using "remove me" as the subject.