|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
''''汉字拼音首字母''''''''''''''''''''''''''
Public Function LChin(Str As String) As Variant
On Error Resume Next
Str = StrConv(Str, vbNarrow)
If Asc(Str) > 0 Or Err.Number = 1004 Then LChin = ""
LChin = WorksheetFunction.VLookup(Str, [{"吖","a";"八","b";"嚓","c";"咑","d";"鵽","e";"发","f";"猤","g";"铪","h";"夻","j";"咔","k";"垃","l";"嘸","m";"旀","n";"噢","o";"妑","p";"七","q";"囕","r";"仨","s";"他","t";"屲","w";"夕","x";"丫","y";"帀","z"}], 2)
End Function
Function py(Str)
For i = 1 To Len(Str)
py = py & LChin(Mid(Str, i, 1))
Next
End Function |
评分
-
1
查看全部评分
-
|