Rounding up in Access

P

PhilipBenno

I need to round a value up if it slightly goes over a whole number eg 2.01 to
2.49 needs to be rounded up to 3 anybody got any ideas - Thanks
 
J

James A. Fortune

LGC said:
...and if the precision is greater than .01 you can use:

Abs(Int(-(OriginalNumber)))

-LGC
....and if the values can also be negative you can use:

Public Function Ceiling(dblX As Double) As Long
Ceiling = Int(dblX) + Abs(dblX > Int(dblX))
End Function

e.g.,

2.001 ==> 3
2 ==> 2
0 ==> 0
-1.5 ==> -1
-2 ==> -2

-JAF
 
Top