William Benson
vbacreations at gmail.com
Fri Dec 23 21:42:48 CST 2011
Ok good article ... seems to have been written before ac2010 but I am certainly willing to believe that VBA does no better job of these things than it ever did. THAT SAID... my hope (and trust) is that the Excel interface and its functions would do a better job with calculations. Wherever possible I try to use the worksheet to do as much work as possible. Is that a mistake? I would hate to think I really need to be adding such tedious Udfs to formulas just to get accurate results ?? On Dec 23, 2011 11:06 AM, "Salakhetdinov Shamil" <mcp2004 at mail.ru> wrote: > Hi Mark, Gustav at all -- > > > Are you sure MSFT did not "fix" Round in later versions ? > They didn't. > > > So bottomline: VBA side....Format and Round produce difference results > Yes, the do. > > Access 2010: > > ?round(2.5) > 2 > ?format(2.5, "0") > 3 > > Proper rounding in VBA is a long story originated here: > > http://www.fmsinc.com/tpapers/math/index.html > > or even earlier... > > Thank you. > > -- Shamil > > 23 декабря 2011, 17:29 от "Mark Simms" <marksimms at verizon.net>: > > Thanks Gustav. Once again, we've got versions 2003, 2007, 2010. > > So bottomline: VBA side....Format and Round produce difference results ? > > > > > Hint: The only native function of VB(A) that handles 4/5 rounding > > > correctly is Format. It is, however, not very fast so if speed is a > > > concern you have to run a custom function. And no, the VB(A) function > > > Round is not the answer to any serious task: > > > > > > > > > /gustav > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >