....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
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.