首页 /编程语言和算法/VB6/VBA/ASP
 VBA代码 PointFormat 小数前导位 处理.5 和0.5 为0.5
2025年3月18日 15:38
Function PointFormat(ByVal x)
    '小数前导位 处理.5 和0.5 为0.5
    Dim y As String
    y = Replace(x, "-.", "-0.")

    If x Like ".*" Then
        y = 0 & x
    End If

    PointFormat = y
End Function


 
全部回复(0)
首页 | 电脑版 |