首页 / 教程
在wps表格提出名字拼音首字母 | 在WPS表格里把姓名全部转换为拼音或小写字母
2022-10-28 12:27:00
1.在WPS表格里怎么把姓名全部转换为拼音或小写字母
想要在2113WPS表格中把汉字转换成拼音或小写字5261母,只需要运用模块4102代码编辑功能1653就能轻松解决,具体操作方法如下:步骤1、打开要转换成拼音的excel表格,按“Alt+F11”组合键,进入Visual Basic编辑状态。
也就是看到的这个灰色的编辑界面。步骤2、执行“插入→模块”命令,插入一个新模块。
再双击插入的模块,进入模块代码编辑状态。步骤3、看到如下界面。
步骤4、把下面的所有内容复制,粘贴到步骤4中的空白处。Function pinyin(p As String) As String i = Asc(p) Select Case i Case -20319 To -20318: pinyin = "a " Case -20317 To -20305: pinyin = "ai " Case -20304 To -20296: pinyin = "an " Case -20295 To -20293: pinyin = "ang " Case -20292 To -20284: pinyin = "ao " Case -20283 To -20266: pinyin = "ba " Case -20265 To -20258: pinyin = "bai " Case -20257 To -20243: pinyin = "ban " Case -20242 To -20231: pinyin = "bang " Case -20230 To -20052: pinyin = "bao " Case -20051 To -20037: pinyin = "bei " Case -20036 To -20033: pinyin = "ben " Case -20032 To -20027: pinyin = "beng " Case -20026 To -20003: pinyin = "bi " Case -20002 To -19991: pinyin = "bian " Case -19990 To -19987: pinyin = "biao " Case -19986 To -19983: pinyin = "bie " Case -19982 To -19977: pinyin = "bin " Case -19976 To -19806: pinyin = "bing " Case -19805 To -19785: pinyin = "bo " Case -19784 To -19776: pinyin = "bu " Case -19775 To -19775: pinyin = "ca " Case -17721 To -17704: pinyin = "he " Case -17703 To -17702: pinyin = "hei " Case -17701 To -17698: pinyin = "hen " Case -17697 To -17693: pinyin = "heng " Case -17692 To -17684: pinyin = "hong " Case -17683 To -17677: pinyin = "hou " Case -17676 To -17497: pinyin = "hu " 步骤5、按下ALT+Q关闭Visual Basic编辑窗口,返回Excel编辑状态。
步骤6、选中转换后的拼音需要放在哪个列,例如要把B列的第2行的内容转换成拼音,放在D列的第2个单元格,输入公式:=getpy(B2),这里的B2,是指源头单元格的坐标。步骤7、如果要去除拼音之间的空格。
去掉空格的拼音放在E列,如果这个未去掉空格的数据原来在D2单元格,去掉空格之后的拼音放在E2单元格,则在E2单元格输: =SUBSTITUTE(D2," ","")。
2.wps 或者excel 怎么用首字母查找姓名
假设源数据(姓名)在Sheet1的A列。
1、在Sheet1的B1输入
=LOOKUP(CODE(A1),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"})&IF(LEN(A1)>1,LOOKUP(CODE(MID(A1,2,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"}),"")&IF(LEN(A1)>2,LOOKUP(CODE(MID(A1,3,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"}),"")
回车并向下填充;
2、Sheet2的A1留给你输入姓名拼音开头(如LYH或LY);
3、Sheet2的A2输入
=INDEX(Sheet1!A:A,SMALL(IF(ISNUMBER(FIND(A$1,Sheet1!B$1:B$1000)),ROW($A$1:$A$1000),4^8),ROW(1:1)))&""
数组公式,输入后先不要回车,按Ctrl+Shift+Enter结束计算,再向下填充。
3.请教在EXCEL中把人名的拼音首字母提取的方法
LOOKUP(CODE(LEFT(B1,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"})&LOOKUP(CODE(MID(B1,2,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"})&LOOKUP(CODE(MID(B1,3,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"})
公式太长,不写if了,名字为2个字的删除最后一个&lookup()
4.wps或者word文字怎么以拼音首字母排列
操作步骤:
1、选中表格;
2、单击表格工具---->;布局---->;排序,如图所示;
3、弹出排序对话框,在类型处选择拼音即可,如图所示。
最新内容
手机 |
相关内容
在电脑上女字的拼音怎么打(电脑上
在电脑上女字的拼音怎么打(电脑上怎么打出女这个字的拼音),拼音,声调,电脑上,女人,左键,单击,软键盘,女性,1. 电脑上怎么打出女这个字的拼word表格分页怎么设置(word如何让
word表格分页怎么设置(word如何让表格分页),分页,点击,设置,选项卡,重复,单击,布局,界面,1. word如何让表格分页1、选择你需要在每页重复的表格选定的快捷键(选定所有表格快
表格选定的快捷键(选定所有表格快捷键),数据,区域,快捷键,鼠标,全选,快速,方法,选择,1. 选定所有表格快捷键首先将鼠标光标定位在表格中第电脑怎么制作空白表格(电脑如何制
电脑怎么制作空白表格(电脑如何制作空白表格),选择,数据,点击,选项,区域,设置,文字,格式,电脑如何制作空白表格原数据分A、B、C、D四列即月吊顶设置转换层规范(吊顶转换层设
吊顶设置转换层规范(吊顶转换层设置要求),转换,板面,龙骨,设置,控制,结构,规范,作用,1. 吊顶设置转换层规范1.高度大于3米要连接转换层结构简体转换快捷键(简繁转换快捷键)
简体转换快捷键(简繁转换快捷键),简繁转换,快捷键,点击,转换,简体,简体中文,文档,选项,1. 简繁转换快捷键快捷键Ctrl+A把里边全部选中,在审泊船瓜洲拼音 | 古诗拼音注音版
泊船瓜洲拼音 | 古诗拼音注音版,瓜洲,钟山,京口,长江,江南,拼音,停泊,北岸,泊船瓜洲拼音:京口瓜洲一水间(jīngkǒuguāzhōuyīshuǐjiān),钟word表格续表快捷键(word表格自动
word表格续表快捷键(word表格自动续表),点击,表头,文档,选择,第二,设置,位置,添加,1. word表格自动续表本文以win7系统word2018为例进行演