• 1
  • 2
  • 3
  • 4

首页 / 教程

在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、弹出排序对话框,在类型处选择拼音即可,如图所示。

如何在wps表格提出名字拼音首字母

首字母姓名拼音表格转换

  • 1
  • 2
  • 3
  • 4

最新内容

手机

相关内容

  • 1
  • 2
  • 3

猜你喜欢