Excel中的转换金额中文大小写的函数
Function UpperCurrency(Value) As String
On Error Resume Next
ybb = Round(Value * 100)
y = Int(ybb / 100)
j = Int(ybb / 10) - y * 10
f = ybb - y * 100 - j * 10
zy = Application.WorksheetFunction.Text(y, "[dbnum2]")
zj = Application.WorksheetFunction.Text(j, "[dbnum2]")
zf = Application.WorksheetFunction.Text(f, "[dbnum2]")
UpperCurrency = zy & "圆"
If f <> 0 And j <> 0 Then
UpperCurrency = UpperCurrency & zj & "角" & zf & "分"
If y = 0 Then
UpperCurrency = zj & "角" & zf & "分"
End If
End If
If f = 0 And j <> 0 Then
UpperCurrency = UpperCurrency & zj & "角"
If y = 0 Then
UpperCurrency = zj & "角"
End If
End If
If f <> 0 And j = 0 Then
UpperCurrency = UpperCurrency & zj & zf & "分"
If y = 0 Then
UpperCurrency = zf & "分"
End If
End If
If (Value = "") Or (UpperCurrency = "零圆") Then UpperCurrency = ""
End Function