问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

如何使EXCEL的中文名字快速变成简写的首个英文字母?

发布网友 发布时间:2022-04-26 02:06

我来回答

6个回答

热心网友 时间:2022-04-11 18:49

下面是一个VBA自定义函数,按ALT+F11,右键点窗口左边sheet1-插入-模块,在右面窗口中粘贴下面代码。
若A1内容为 张三 ,则在某空白格中输入:=hzszm(a1) 即可

Function hzszm(hzpy As String) As String
Dim hzstring As String, pystring As String
Dim hzpysum As Integer, hzi As Integer, hzpyhex As Integer
hzstring = Trim(hzpy)
hzpysum = Len(Trim(hzstring))
pystring = ""
For hzi = 1 To hzpysum
hzpyhex = "&H" + Hex(Asc(Mid(hzstring, hzi, 1)))
Select Case hzpyhex
Case &HB0A1 To &HB0C4: pystring = pystring + "A"
Case &HB0C5 To &HB2C0: pystring = pystring + "B"
Case &HB2C1 To &HB4ED: pystring = pystring + "C"
Case &HB4EE To &HB6E9: pystring = pystring + "D"
Case &HB6EA To &HB7A1: pystring = pystring + "E"
Case &HB7A2 To &HB8C0: pystring = pystring + "F"
Case &HB8C1 To &HB9FD: pystring = pystring + "G"
Case &HB9FE To &HBBF6: pystring = pystring + "H"
Case &HBBF7 To &HBFA5: pystring = pystring + "J"
Case &HBFA6 To &HC0AB: pystring = pystring + "K"
Case &HC0AC To &HC2E7: pystring = pystring + "L"
Case &HC2E8 To &HC4C2: pystring = pystring + "M"
Case &HC4C3 To &HC5B5: pystring = pystring + "N"
Case &HC5B6 To &HC5BD: pystring = pystring + "O"
Case &HC5BE To &HC6D9: pystring = pystring + "P"
Case &HC6DA To &HC8BA: pystring = pystring + "Q"
Case &HC8BB To &HC8F5: pystring = pystring + "R"
Case &HC8F6 To &HCBF9: pystring = pystring + "S"
Case &HCBFA To &HCDD9: pystring = pystring + "T"
Case &HEDC5: pystring = pystring + "T"
Case &HCDDA To &HCEF3: pystring = pystring + "W"
Case &HCEF4 To &HD1B8: pystring = pystring + "X"
Case &HD1B9 To &HD4D0: pystring = pystring + "Y"
Case &HD4D1 To &HD7F9: pystring = pystring + "Z"
Case Else
pystring = pystring + Mid(hzstring, hzi, 1)
End Select
Next
hzszm = pystring
End Function

--------------------------------------------------------------------
楼上的方法很好,改一下:
定义一个名称
PinYin
={"","";"吖","A";"八","B";"嚓","C";"咑","D";"鵽","E";"发","F";"猤","G";"铪","H";"夻","J";"咔","K";"垃","L";"呒","M";"旀","N";"噢","O";"妑","P";"七","Q";"囕","R";"仨","S";"他","T";"屲","W";"夕","X";"丫","Y";"帀","Z"}
然后用公式
=LOOKUP(MID(A1,1,1),PinYin)&LOOKUP(MID(A1,2,1),PinYin)&LOOKUP(MID(A1,3,1),PinYin)&LOOKUP(MID(A1,4,1),PinYin)&LOOKUP(MID(A1,5,1),PinYin)【姓名最多N个字就用N-1个&】

热心网友 时间:2022-04-11 20:07

比如姓名在A1,=LOOKUP(CODE(LEFT(A1,1)),45217+{0,36,544,1101,1609,1793,2080,2560,2902,3845,4107,4679,5154,5397,5405,5689,6170,6229,7001,7481,7763,8472,9264},{"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y","Z"})

热心网友 时间:2022-04-11 21:41

定义一个名称
PinYin={"","";"吖","A";"八","B";"嚓","C";"咑","D";"鵽","E";"发","F";"猤","G";"铪","H";"夻","J";"咔","K";"垃","L";"呒","M";"旀","N";"噢","O";"妑","P";"七","Q";"囕","R";"仨","S";"他","T";"屲","W";"夕","X";"丫","Y";"帀","Z"}
然后用公式
=IF(LEN(A1)>0,LOOKUP(MID(A1,1,1),PinYin),"")&IF(LEN(A1)>1,LOOKUP(MID(A1,2,1),PinYin),"")&IF(LEN(A1)>2,LOOKUP(MID(A1,3,1),PinYin),"")&IF(LEN(A1)>3,LOOKUP(MID(A1,4,1),PinYin),"")可以得到他们的首字母

热心网友 时间:2022-04-11 23:33

查拼音软件,我用过你说的功能都有

热心网友 时间:2022-04-12 01:41

用公式

热心网友 时间:2022-04-12 04:05

发给我,我来帮你搞,简单的很
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
男生买卫生巾支援灾区对吗? 打了耳洞三天下了耳钉,怎么办!! cs七龙珠家里两台电脑怎么连局域网玩 CS七龙珠怎么创建联网房间 CS七龙珠怎样和电脑玩 CS七龙珠能和电脑对打吗 不然怎样调对打模式有哪些地图!!!急需... 糖葫芦的山楂在哪里买 衡水市康宁街与人民路交叉口市一建家属院7号楼,1-201怎么翻译 梦见朋友搬家时小孩因我不愿离去,且小孩坐在床上跑出许老鼠? 梦见搬家是什么预兆解梦 皲裂性湿疹怎么治疗? 将excel中全称批量转换为简称? 皲裂性湿疹怎么去根? 皲裂性湿疹用什么药膏? excel怎么把繁体字变成简体 皲裂性湿疹抹什么药? 在excel表中,如何将 公司全称改为简称?如:深圳市华美丽科技有限公司变成简称华美丽, 吃百香果会致癌是真的吗? 如何治疗皲裂性湿疹? 江西抚州宜黄适合种植榴莲、百香果、莲雾、红毛丹吗 如何在excel中把所有供应商公司的全称转换成简称? 怎样治手部皲裂湿疹? 手足皲裂性湿疹怎么治? 世界前十大最好吃的水果有什么? 有哪些水果看似低热量,实际上热量比炸鸡还高? 皲裂性湿疹用什么药膏抹效果好? 为什么越南榴莲,百香果和柚子不准进入中国市场? 1991年生肖属羊的性格? 里面有点像百香果但是果肉是白色的,香味有点像榴莲,这是什么水果? 射手座属羊的男人是怎样的性格 皲裂性湿疹用什么药膏 怎么把excel的繁体变成简体 皲裂性湿疹用什么药膏效果好? excel怎么把繁体字全改成简体字 治疗皲裂性湿疹有效方法有哪些?? 脚上皲裂性湿疹怎么办 EXCEL表格怎么实现自动简写 皲裂性湿疹应该用什么药才能治好? 皲裂性湿疹能根治吗? 如何把excel的字体变成简体 皲裂性湿疹怎么快速治疗? EXCEL做个公式,希望输入全称,后面显示简称 请问ios系统的wps怎么调整页边距? word里的excel怎么繁转简 手机wps左右页边距怎么设置?求高手求求 期权有哪些做法,期权的特征有哪些 怎么让iOS系统的WPS里的文档页面大小改变。 苹果手机wps页面设置在哪 为什么我的电脑windows Defender更新总是失败错误代码是0x80072ee2 怎样把一个容量大的文件压缩成几个小的文件,要什么软件,哪里下载