Function ceil(n,m)
temp = n/m
If Int(temp)/temp=1 Then
ceil=temp
Else
ceil=Int(temp)+1
End If
End Function
msgbox ceil(4,5)
msgbox ceil(5,5)
msgbox ceil(6,5)
msgbox ceil(9,5)
Function ceil(n,m)
temp = n/m
If Int(temp)/temp=1 Then
ceil=temp
Else
ceil=Int(temp)+1
End If
End Function
msgbox ceil(4,5)
msgbox ceil(5,5)
msgbox ceil(6,5)
msgbox ceil(9,5)
转载于:https://www.cnblogs.com/zhangfei/archive/2012/06/05/2536520.html