虚拟化容器,大数据,DBA,中间件,监控。

EXCEL表格里名称如何自动生成拼音简码

24 05月
作者:admin|分类:系统运维
单个汉字的话可以直接用公式,多个汉字的话vba更方便一些。

按住ALT依次按F11,I,M。将下面的代码粘贴到右侧窗口。

==========
Function PY(x)
    On Error Resume Next
    Application.Volatile
    For i = 1 To Len(x)
        PY = PY & Application.WorksheetFunction.HLookup(Mid(x, i, 1), [{"吖","八","嚓","咑","鵽","发","猤","铪","夻","咔","垃","呒","旀","噢","妑","七","囕","仨","他","屲","夕","丫","帀";"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"}], 2)
    Next
End Function
==========

假设要转化的汉字在A列,B1输入公式 =PY(A1)向下填充即可。
浏览3982 评论0
返回
目录
返回
首页
单网卡 双网段连接方法 Debian下ispCP安装详细教程 – ISPCP开源虚拟主机管理系统