本帖最后由 YZC51 于 2019-12-5 12:48 编辑
学习老师的拼音函数。谢谢老师!
http://club.excelhome.net/thread-467126-13-1.html
感觉这个更好些!
Public Function LChin(myStr)
Dim str$, L$, temp$
str = Replace(myStr, " ", "")
dict = [{"吖","a";"八","b";"擦","c";"咑","d";"鵽","e";"发","f";"伽","g";"哈","h";"丌","j";"咔","k";"垃","l";"妈","m";"拿","n";"哦","o";"妑","p";"七","q";"然","r";"仨","s";"他","t";"屲","w";"夕","x";"丫","y";"帀","z"}]
For i = 1 To Len(str)
L = Mid$(str, i, 1)
If L Like "[一-龥]" Then
temp = temp & Application.Lookup(L, dict)
Else
temp = temp & L
End If
Next i
LChin = UCase(temp)
End Function
补充内容 (2020-6-23 12:44):
擦 修改 为 嚓 |