编写了一个自定义函数,能将自然数转化成以民间的“正”字计数,只是4字用止字代替(少上面一横,民间是少下面一横)
Public Function Zheng(Num As Long) As String
Dim i As Integer, j As Integer, Mstr As String
L = Int(Num / 5)
Y = Num Mod 5
If L > 0 Then
For i = 1 To L
Mstr = Mstr & "正"
Next
End If
Select Case Y
Case 1
Mstr = Mstr & "一"
Case 2
Mstr = Mstr & "丄"
Case 3
Mstr = Mstr & "上"
Case 4
Mstr = Mstr & "止"
End Select
Zheng = Mstr
End Function