|
替换- Function DX(amountInFigures As Variant) '人民币大写 163字符A 无缺陷 负数显示 “负”
- Dim amountInWord As String
- amountInFigures = Format(amountInFigures, "standard")
- amountInWord = Application.WorksheetFunction.Text(amountInFigures, "[dbnum2]")
- amountInWord = Replace(amountInWord, "-", "负")
- If CInt(Right(amountInFigures, 2)) = 0 Then
- DX = amountInWord & "元整"
- ElseIf CInt(Right(amountInFigures, 2)) > 0 Then
- amountInWord = Replace(amountInWord, ".", "元")
- If CInt(Right(amountInFigures, 1)) = 0 Then
- DX = amountInWord & "角"
- ElseIf CInt(Right(amountInFigures, 2)) < 10 Then
- DX = Left(amountInWord, Len(amountInWord) - 1) & Right(amountInWord, 1) & "分"
- ElseIf CInt(Right(amountInFigures, 2)) > 10 Then
- DX = Left(amountInWord, Len(amountInWord) - 1) & "角" & Right(amountInWord, 1) & "分"
- End If
- End If
- End Function
复制代码 大写函数 |
评分
-
1
查看全部评分
-
|