|
Function D(Q)
YBB = Round(Q * 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]")
D = ZY & "元"
If F <> 0 And J <> 0 Then
D = D & ZJ & "角" & ZF & "分"
If Y = 0 Then
D = ZJ & "角" & ZF & "分"
End If
End If
If F = 0 And J <> 0 Then
D = D & ZJ & "角"
If Y = 0 Then
D = ZJ & "角"
End If
End If
If F <> 0 And J = 0 Then
D = D & ZJ & ZF & "分"
If Y = 0 Then
D = ZF & "分"
End If
End If
If Q = "" Then
D = 0
End IfEnd Function |
|