Office中国论坛/Access中国论坛

标题: Access像Excel RoundUp的函数 [打印本页]

作者: admin    时间: 2013-6-13 12:09
标题: Access像Excel RoundUp的函数

Public Function Roundup As Variant(Number As Variant, NumDigits As Integer) As Double
Roundup = -Sgn(Number) * Int(-Abs(Number) * 10 ^ NumDigits) * 10 ^ -NumDigits
End Function


Function Roundup(Number As Variant) As Long
Roundup = -Sgn(Number) * Int(-Abs(Number))
End Function


Function Roundup(Number As Variant) As Variant
On Error Resume Next
Roundup = -Sgn(Number) * Int(-Abs(Number))
End Function

作者: 李力军2    时间: 2013-10-2 11:21
只看得懂标题啊!
作者: uncletse    时间: 2014-9-10 23:34
非常感谢!
作者: yusmin    时间: 2014-12-15 22:07
学习




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3