D
ddiel
when dividing a by b giving c; need to round-up c if it is not a whole number
Excel has roundup but Access is devoid of this function.
Excel has roundup but Access is devoid of this function.
ddiel said:when dividing a by b giving c; need to round-up c if it is not a whole
number
Excel has roundup but Access is devoid of this function.
Round( a / b ) should give you what you need. That's actually
Round( a / b, 0) where the number to the right of the comma is the
number of decimals to round. As the helpfile in Access notes, if
this is omitted, integers are returned.
Jack Leach said:What am I talking about?
?round(3.3,0)
3
?round(3.6,0)
4
?round(4.3,0)
4
?round(4.6,0)
5
Now.. I know I've been through this before, and this didn't compute
like
this (because I had to write a custom function to get it to work
correctly),
but now... the above rounds exactly as should... I even remember
reading
posts on how vba rounded up or down based on the odd/even value of the
number...
<scratches head>
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
This form of rounding is the most accurate since the integer
portion is just as likely to be even as odd and therefore in the
midway cases it is just as likely to round up as down.
David W. Fenton said:"Most accurate" only when you're aggregating the results.
Human beings expect .5 to round up, regardless.
And for negative numbers
What else would you be doing with them? Your method of rounding up
in every case will definitely be less accurate in the aggregate or
in in any other situation.
Wrong, human beings expect rounding to produce the most accurate
results, which
is why we were all taught this method of rounding in 3rd grade
arithmetic.
For negative numbers the correct scientific rounding also produces
the most accurate results.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.