Rounding

  • Thread starter Thread starter DB
  • Start date Start date
D

DB

I originally posted this under "General Discussions", but
I think it might belong here instead so sorry for the
duplicate if you noticed it under "General Discussions".

Hi, I'm using the "round" function in a query like this:
Round([Field_Name],0). My problem is that when a number
has a decimal of exactly .5 it gets rounded down and I
would like it to be rounded up. For example, when 10.5 is
returned it gets rounded to 10. I would like it to be
rounded to 11. Is it possible to have a decimal of .5 be
rounded up instead of down? Thanks.
 
Hi,

Actually, Access uses bankers rounding meaning it will
always round numbers ending in .5 to the nearest even
number. So, 10.5 should round to 10 while 11.5 should
round to 12. This is to minimize the cumulative affect
of the rounding.

I believe that the most common workaround to always round
up is to add 0.5 to the original number and then use the
int() function to return the resulting integer.

HTH, Ted Allen
 
Back
Top