The simplest version I think would be:Public function Ceiling(ByVal X As Double) As DoubleCeiling = Int(X) - (X - Int(X) > 0)End FunctionWatch out for negative numbers, as David Smart suggested. This functionwould round them up.