[AccessD] My Excel project...you won't believe this one

William Benson vbacreations at gmail.com
Sat Dec 24 09:39:13 CST 2011


I disagree Gustav (and I don't like to disagree with you! Especially at
Christmas time :)

Any time you cannot guarantee a reliable result by your methods.... and are
not knowledgable or willing to inform your users under what conditions they
can expect results to be proper or improper...  that is wrong.
On Dec 24, 2011 10:31 AM, "Gustav Brock" <gustav at cactus.dk> wrote:

> Hi Shamil
>
> Well, that article is more about the normal precautions to take when
> dealing with floating point numbers more than rounding issues.
>
> It is with rounding as with many other tasks that many methods exist and
> no one is wrong. It all depends.
>
> /gustav
>
>
> >>> mcp2004 at mail.ru 23-12-2011 17:05 >>>
> 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
>



More information about the AccessD mailing list