I want to obtain code whereby if the quantity field is not a whole number e.g. 2.4, 4.8, etc. then it will round up the number to the next highest whole number e.g. 2.1 would become 3. I would be grateful if anyone can help.
Function RoundUp(ByVal varNumber As Variant) As Variant
If IsNumeric(varNumber) Then
If varNumber = Int(varNumber) Then
RoundUp = Int(varNumber)
Else
RoundUp = Int(varNumber) + 1
End If
End If
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.