|
楼主 |
发表于 2017-4-28 22:07
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
拼音函数是别人的,未认证验证,确实是有问题。
将其改成
Public Function PINYIN(AAAA As String) As String
On Error Resume Next
PINYIN = ""
For I = 1 To Len(Trim(AAAA))
P = Mid(Trim(AAAA), I, 1)
If Asc(P) < 0 Then
PINYIN = PINYIN + Application.WorksheetFunction.VLookup(P, [{"啊","A";"芭","B";"擦","C";"搭","D";"蛾","E";"发","F";"噶","G";"哈","H";"击","J";"喀","K";"垃","L";"妈","M";"拿","N";"哦","O";"啪","P";"期","Q";"然","R";"撒","S";"塌","T";"挖","W";"昔","X";"压","Y";"匝","Z"}], 2)
Else: PINYIN = PINYIN & P
End If
Next
End Function
|
|