Rounding Up Numbers

T

Tom

I'm running a query on actual weights for packages that we
have shipped. This is normally a 2 decimal number.
(Example: 2.24 lbs.) In my query or report, I need this
numbet to always round up which is the way the US. Post
Office or UPS calculates shipping rates. Is there anything
simple that I can do/use?? Thanks!
 
V

Van T. Dinh

Chris

Tom wants to round the number UP all the time so your suggestion won't work
correctly.
 
R

Remi Despres

Tom,
the Int() function will always round negative numbers away from 0. For example:

Int(-3.1) = -4
Int(-2.9) = -3

You can use this to your advantage and try something like:

-1*(Int(-1*myVariable))

assuming that your value is always a positive number

Best regards,
R/mi.
 

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

Top