how to round up number using expression

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I need to write an expression on rounding up a number to the nearest digit
in a query. The trick is the number have to round up rather than round down,
For example 2.6/2=1.3 or 3.4/2=1.7 and it shound all round up to 2. Thanks
 
This expression will round positive numbers up to next integer:

-Int(-MyNumber)

Replace MyNumber with the actual number or the name of the field.
 
Paul,

The Int() function rounds a number down.
To round a number up: negate, use Int(), and negate the result:
=-Int(-[MyValue])

markfou
 
Paul,
The Int() function rounds a number down.
To round a number up: negate, use Int(), and negate the result:

=-Int(-[MyValue])

markfou
 
Back
Top