If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Rounding
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. |
#2
|
|||
|
|||
Rounding
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 -----Original Message----- 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. . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rounding a Number Up or Down-Depending on Situation | Dave Y | Worksheet Functions | 6 | June 18th, 2004 04:39 PM |
average rounding to 3 decimal places | Bernie Deitrick | Worksheet Functions | 0 | June 2nd, 2004 06:11 PM |
Rounding Error | Peo Sjoblom | Worksheet Functions | 3 | April 19th, 2004 01:59 PM |
No Rounding - need full decimal value | JE McGimpsey | Worksheet Functions | 2 | March 10th, 2004 10:55 PM |
rounding | Carla | Worksheet Functions | 1 | February 4th, 2004 03:08 PM |