Round Up

A

Ann

Can anyone tell me is it possible to round down in an
Access query as well as round up?
 
W

Wayne Morgan

As opposed to what norm? The built in Round function will round .5 to the nearest even
number whether that be up or down. The most frequent rounding in the US is to always round
up .5, but everything else goes up or down to the nearest number. If you always want to go
down, even if the value is .9, then all you need to do is truncate the decimal portion of
the number, check the help file for the FIX and INT functions. If you aren't wanting to
"round" to the ones position, you will need to multiply or divide to put the position you
want to "round" to in the ones position, run one of the 2 functions mentioned above, then
do the reverse of the multiply or divide that you did above to put the position you're
"rounding" to back where it belongs.

Example:
"Round" to ones position
RoundedNumber = Int(Number)

"Round" to tens position
RoundedNumber = Int(Number / 10) * 10

"Round" to tenths position
RoundedNumber = Int(Number * 10) / 10

The difference in INT and FIX is in how they handle negative numbers.

If this isn't what you want, will you be more specific and I'll adjust the formula.
 

Ask a Question

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.

Ask a Question

Similar Threads

News CES 2019 round up 6
Problem with rounding error 3
Windows 7 Internet Access 3
round function? 2
Round up or down to nearest 5, but not 10 2
Round Up in Forms and Reports 1
rounding up a number 8
Possible router problems 9

Top