Function DX(n)
DX = Replace(Application.Text(Round(n + 0.00000001, 2), "[DBnum2]"), ".", "元")
DX = IIf(Left(Right(DX, 3), 1) = "元", Left(DX, Len(DX) - 1) & "角" & Right(DX, 1) & "分", IIf(Left(Right(DX, 2), 1) = "元", DX & "角整", IIf(DX = "零", "", DX & "元整")))
DX = Replace(Replace(Replace(Replace(DX, "零元零角", ""), "零元", ""), "零角", "零"), "-", "负")
End Function
|