笑话大全网 - 笑话段子 - 在excel中数字能用画正字的方式表示嘛,比如5就是一个正字,4就是正字少一笔?

在excel中数字能用画正字的方式表示嘛,比如5就是一个正字,4就是正字少一笔?

编写了一个自定义函数,能将自然数转化成以民间的“正”字计数,只是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