改进一下,去掉没用的0 让结果分别是 5和3.5
代码如下:
Function fm(nb)
If IsNumeric(nb) Then
Dim a
a=FormatNumber(nb,2,-1)
If Right((a+""),2)=00 Then
fm=CLng(a)
Else
fm=FormatNumber(nb,1,-1)
End if
Else
fm=0
End if
End Function
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!