Evaluate the integer equal or higher than a given value

The VBA language offers the Int() function, which returns the integer equal or lower than a given value, but lacks a similar function that returns the integer equal or higher than a given value. You can remedy with the following function:

' Returns the integer equal or higher than its argumentFunction Ceiling(Number As Double) As Long    Ceiling = -Int(-Number)End Function

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: