...

View Full Version : rounding up



ghell
03-23-2004, 05:45 PM
is there any way to round UP (fix and int round down) that isnt just 1 of fix+1, int+1 or round+0.5 because they all return 1 for 0, 2 for 1 etc i think round+0.4999999 pay work but i dont know and if there is a better ceiling function i would prefer to use that

ghell
03-23-2004, 05:49 PM
i suppose i could do

if int(number) <> number then number = int(number)+1
and take the variable called number out of that

jessegavin
03-23-2004, 09:53 PM
Same thing but in a function....


Function Ceil(n)
If (n = Int(n)) Then
Ceil = n
Else
Ceil = Int(n+1)
End If
End Function



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum